From 5214ebdc3ade55125d1ed07cb1e9213a16211388 Mon Sep 17 00:00:00 2001 From: icp Date: Sun, 9 Oct 2022 11:44:07 +0530 Subject: [PATCH] black: update to 22.10.0. --- .../patches/remove_reduntant_build_dep.patch | 25 +++++++++++++++++++ srcpkgs/black/template | 20 ++++++--------- 2 files changed, 32 insertions(+), 13 deletions(-) create mode 100644 srcpkgs/black/patches/remove_reduntant_build_dep.patch diff --git a/srcpkgs/black/patches/remove_reduntant_build_dep.patch b/srcpkgs/black/patches/remove_reduntant_build_dep.patch new file mode 100644 index 000000000000..63054e2f4b3c --- /dev/null +++ b/srcpkgs/black/patches/remove_reduntant_build_dep.patch @@ -0,0 +1,25 @@ +--- a/pyproject.toml ++++ b/pyproject.toml +@@ -26,7 +26,7 @@ preview = true + # NOTE: You don't need this in your own Black configuration. + + [build-system] +-requires = ["hatchling>=1.8.0", "hatch-vcs", "hatch-fancy-pypi-readme"] ++requires = ["hatchling>=1.8.0", "hatch-vcs"] + build-backend = "hatchling.build" + + [project] +@@ -92,13 +92,6 @@ blackd = "blackd:patched_main [d]" + Changelog = "https://github.com/psf/black/blob/main/CHANGES.md" + Homepage = "https://github.com/psf/black" + +-[tool.hatch.metadata.hooks.fancy-pypi-readme] +-content-type = "text/markdown" +-fragments = [ +- { path = "README.md" }, +- { path = "CHANGES.md" }, +-] +- + [tool.hatch.version] + source = "vcs" + diff --git a/srcpkgs/black/template b/srcpkgs/black/template index 6acc211b8d4a..1ace4ae8a5ce 100644 --- a/srcpkgs/black/template +++ b/srcpkgs/black/template @@ -1,9 +1,9 @@ # Template file for 'black' pkgname=black -version=22.8.0 +version=22.10.0 revision=1 -build_style=python3-module -hostmakedepends="python3-wheel python3-setuptools_scm" +build_style=python3-pep517 +hostmakedepends="hatchling hatch-vcs" 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" @@ -13,17 +13,11 @@ 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=792f7eb540ba9a17e8656538701d3eb1afcb134e3b45b71f20b25c77a8db7e6e +checksum=f513588da599943e0cde4e32cc9879e825d58720d6557062d1098c5ad80080e1 +make_check_pre="env PYTHONPATH=src" -do_check() { - PYTHONPATH="$(cd build/lib* && pwd)" python3 -m pytest --run-optional jupyter -m jupyter - - 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 - - PYTHONPATH="$(cd build/lib* && pwd)" python3 -m black --check src tests setup.py +post_check() { + PYTHONPATH=src python3 -m black --check src tests } post_install() {