Github messages for voidlinux
 help / color / mirror / Atom feed
* [PR PATCH] black: update to 22.3.0.
@ 2022-06-25  6:35 icp1994
  2022-06-25 15:21 ` [PR PATCH] [Merged]: " leahneukirchen
  0 siblings, 1 reply; 2+ messages in thread
From: icp1994 @ 2022-06-25  6:35 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 947 bytes --]

There is a new pull request by icp1994 against master on the void-packages repository

https://github.com/icp1994/void-packages black
https://github.com/void-linux/void-packages/pull/37676

black: update to 22.3.0.
#### Testing the changes
- I tested the changes in this PR: **YES**|**briefly**|**NO**

#### Local build testing
- I built this PR locally for my native architecture, x86_64

Supersedes https://github.com/void-linux/void-packages/pull/34520. As I mentioned in a comment there, I had to run the tests twice (with jupyter dependencies enabled/disabled) in accordance with the [upstream testing](https://github.com/psf/black/blob/ae2c0758c9e61a385df9700dc9c231bf54887041/tox.ini#L37). I don't know how to remove a dependency installed via `checkdepends` temporarily in `do_check()`. So I moved the module "manually" out of site-packages.

A patch file from https://github.com/void-linux/void-packages/pull/37676.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-black-37676.patch --]
[-- Type: text/x-diff, Size: 2664 bytes --]

From f4d5ebb41219c28b6d724eeec4f368f88f0472c6 Mon Sep 17 00:00:00 2001
From: icp <pangolin@vivaldi.net>
Date: Sat, 25 Jun 2022 11:57:04 +0530
Subject: [PATCH] black: update to 22.3.0.

---
 srcpkgs/black/template | 30 ++++++++++++++----------------
 1 file changed, 14 insertions(+), 16 deletions(-)

diff --git a/srcpkgs/black/template b/srcpkgs/black/template
index b17749777fb0..c197da7cc670 100644
--- a/srcpkgs/black/template
+++ b/srcpkgs/black/template
@@ -1,30 +1,28 @@
 # Template file for 'black'
 pkgname=black
-version=21.9b0
-revision=2
+version=22.3.0
+revision=1
 build_style=python3-module
-# Disable tests that require `black` in the search path for commands.
-make_check_args="--deselect tests/test_primer.py::PrimerLibTests::test_gen_check_output
- --deselect tests/test_primer.py::PrimerLibTests::test_process_queue
- --deselect tests/test_primer.py::PrimerCLITests::test_async_main"
 hostmakedepends="python3-setuptools python3-setuptools_scm"
-depends="python3-click python3-platformdirs python3-tomli
- python3-mypy_extensions python3-pathspec python3-regex
- python3-typing_extensions"
-checkdepends="python3-typed-ast python3-aiohttp python3-aiohttp-cors
- python3-pytest python3-parameterized python3-ipython python3-tokenize-rt
- $depends"
+depends="python3-click python3-platformdirs python3-tomli python3-pathspec python3-mypy_extensions"
+checkdepends="${depends} python3-pytest-xdist python3-aiohttp python3-colorama python3-uvloop
+ python3-ipython python3-tokenize-rt"
 short_desc="Uncompromising Python code formatter"
 maintainer="Orphaned <orphan@voidlinux.org>"
 license="MIT"
 homepage="https://github.com/psf/black"
 changelog="https://raw.githubusercontent.com/psf/black/main/CHANGES.md"
 distfiles="${PYPI_SITE}/b/black/black-${version}.tar.gz"
-checksum=7de4cfc7eb6b710de325712d40125689101d21d25283eed7e9998722cf10eb91
+checksum=35020b8886c022ced9282b51b5a875b6d1ab0c387b31a065b84db7c33085ca79
 
-pre_build() {
-	# <https://gitweb.gentoo.org/repo/gentoo.git/tree/dev-python/black/black-21.8_beta0.ebuild#n45>.
-	vsed -i '/setuptools_scm/s:~=:>=:' setup.cfg
+do_check() {
+	PYTHONPATH="$(cd build/lib* && pwd)" python3 -m pytest --run-optional jupyter \
+		-m jupyter --deselect=tests/test_ipynb.py::test_set_input
+
+	pyver=$(python3 -c 'import sys; print(f"{sys.version_info.major}.{sys.version_info.minor}")')
+	mv ${XBPS_MASTERDIR}/usr/lib/python${pyver}/site-packages/IPython ${XBPS_MASTERDIR}/tmp/IPython.bak
+	PYTHONPATH="$(cd build/lib* && pwd)" python3 -m pytest --run-optional no_jupyter
+	mv ${XBPS_MASTERDIR}/tmp/IPython.bak ${XBPS_MASTERDIR}/usr/lib/python${pyver}/site-packages/IPython
 }
 
 post_install() {

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PR PATCH] [Merged]: black: update to 22.3.0.
  2022-06-25  6:35 [PR PATCH] black: update to 22.3.0 icp1994
@ 2022-06-25 15:21 ` leahneukirchen
  0 siblings, 0 replies; 2+ messages in thread
From: leahneukirchen @ 2022-06-25 15:21 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 783 bytes --]

There's a merged pull request on the void-packages repository

black: update to 22.3.0.
https://github.com/void-linux/void-packages/pull/37676

Description:
#### Testing the changes
- I tested the changes in this PR: **briefly**

#### Local build testing
- I built this PR locally for my native architecture, x86_64

Supersedes https://github.com/void-linux/void-packages/pull/34520. As I mentioned in a comment there, I had to run the tests twice (with jupyter dependencies enabled/disabled) in accordance with the [upstream testing](https://github.com/psf/black/blob/ae2c0758c9e61a385df9700dc9c231bf54887041/tox.ini#L37). I don't know how to remove a dependency installed via `checkdepends` temporarily in `do_check()`. So I moved the module "manually" out of site-packages.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-06-25 15:21 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-25  6:35 [PR PATCH] black: update to 22.3.0 icp1994
2022-06-25 15:21 ` [PR PATCH] [Merged]: " leahneukirchen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).