[arch-commits] Commit in python-black/repos/community-any (PKGBUILD PKGBUILD)

Daniel M. Capella polyzen at gemini.archlinux.org
Wed Nov 17 05:10:57 UTC 2021


    Date: Wednesday, November 17, 2021 @ 05:10:56
  Author: polyzen
Revision: 1049625

archrelease: copy trunk to community-any

Added:
  python-black/repos/community-any/PKGBUILD
    (from rev 1049623, python-black/trunk/PKGBUILD)
Deleted:
  python-black/repos/community-any/PKGBUILD

----------+
 PKGBUILD |  117 ++++++++++++++++++++++++++++++-------------------------------
 1 file changed, 58 insertions(+), 59 deletions(-)

Deleted: PKGBUILD
===================================================================
--- PKGBUILD	2021-11-17 05:10:52 UTC (rev 1049624)
+++ PKGBUILD	2021-11-17 05:10:56 UTC (rev 1049625)
@@ -1,59 +0,0 @@
-# Maintainer: Maxim Baz <$pkgname at maximbaz dot com>
-# Maintainer: Daniel M. Capella <polyzen at archlinux.org>
-# Contributor: James Zhu <jameszhu at berkeley.edu>
-
-pkgname=python-black
-pkgver=21.10b0
-pkgrel=1
-pkgdesc='Uncompromising Python code formatter'
-arch=('any')
-url=https://github.com/psf/black
-license=('MIT')
-depends=('python' 'python-click' 'python-mypy_extensions' 'python-pathspec'
-         'python-platformdirs' 'python-regex' 'python-tomli'
-         'python-typing_extensions')
-makedepends=('python-build' 'python-install' 'python-setuptools-scm'
-             'python-wheel')
-checkdepends=('ipython' 'python-aiohttp' 'python-parameterized' 'python-pytest'
-              'python-typed-ast' 'python-tokenize-rt')
-optdepends=('ipython: for Jupyter notebook support'
-            'python-tokenize-rt: for Jupyter notebook support'
-            'python-aiohttp: for the blackd HTTP server'
-            'python-colorama: for colored diffs'
-            'python-typed-ast: to format Python 2 code')
-source=("https://files.pythonhosted.org/packages/source/b/black/black-$pkgver.tar.gz")
-sha256sums=('a9952229092e325fe5f3dae56d81f639b23f7131eb840781947e4b2886030f33')
-b2sums=('3ebd557b8fd26675f808cbb35cbcc586b86f3d432fb24196b423adcb50f5095b1e0c3eb938b1b5c06a73727fcf348110c9a5a7e7548503124640a25894795e5e')
-
-build() {
-  cd "black-$pkgver"
-  python -m build --wheel --skip-dependency-check --no-isolation
-}
-
-check() {
-  cd "black-$pkgver"
-  mkdir -p temp
-  local site_packages=$(python -c "import site; print(site.getsitepackages()[0])")
-  python -m install --optimize=1 --destdir=temp dist/*.whl
-  chmod +x temp/usr/bin/* # https://github.com/FFY00/python-install/pull/6
-  PATH="$PWD/temp/usr/bin:$PATH" PYTHONPATH="$PWD/temp/$site_packages" pytest tests -m "not without_python2"
-}
-
-package() {
-  cd "black-$pkgver"
-  python -m install --optimize=1 --destdir="$pkgdir" dist/*.whl
-
-  # https://github.com/FFY00/python-install/issues/7
-  sed -i 's/patched_main \[d]/patched_main/' "$pkgdir"/usr/bin/blackd
-
-  # https://github.com/FFY00/python-install/pull/6
-  chmod +x "$pkgdir"/usr/bin/*
-
-  # Symlink license file
-  local site_packages=$(python -c "import site; print(site.getsitepackages()[0])")
-  install -d "$pkgdir"/usr/share/licenses/$pkgname
-  ln -s $site_packages/black-$pkgver.dist-info/LICENSE \
-    "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
-}
-
-# vim:set ts=2 sw=2 et:

Copied: python-black/repos/community-any/PKGBUILD (from rev 1049623, python-black/trunk/PKGBUILD)
===================================================================
--- PKGBUILD	                        (rev 0)
+++ PKGBUILD	2021-11-17 05:10:56 UTC (rev 1049625)
@@ -0,0 +1,58 @@
+# Maintainer: Maxim Baz <$pkgname at maximbaz dot com>
+# Maintainer: Daniel M. Capella <polyzen at archlinux.org>
+# Contributor: James Zhu <jameszhu at berkeley.edu>
+
+pkgname=python-black
+pkgver=21.11b0
+pkgrel=1
+pkgdesc='Uncompromising Python code formatter'
+arch=('any')
+url=https://github.com/psf/black
+license=('MIT')
+depends=('python' 'python-click' 'python-mypy_extensions' 'python-pathspec'
+         'python-platformdirs' 'python-regex' 'python-tomli'
+         'python-typing_extensions')
+makedepends=('python-build' 'python-install' 'python-setuptools-scm'
+             'python-wheel')
+checkdepends=('ipython' 'python-aiohttp' 'python-parameterized' 'python-pytest'
+              'python-typed-ast' 'python-tokenize-rt')
+optdepends=('ipython: for Jupyter notebook support'
+            'python-tokenize-rt: for Jupyter notebook support'
+            'python-aiohttp: for the blackd HTTP server'
+            'python-colorama: for colored diffs'
+            'python-typed-ast: to format Python 2 code')
+source=("https://files.pythonhosted.org/packages/source/b/black/black-$pkgver.tar.gz")
+sha256sums=('83f3852301c8dcb229e9c444dd79f573c8d31c7c2dad9bbaaa94c808630e32aa')
+b2sums=('d166fa43e08023ffdfacac64f6fbac6596a307934126cafa571f28578065e730ad7e07407dd587145119193691d9d5a1d81ee7ccfce927d7c5b32324a2b73711')
+
+build() {
+  cd "black-$pkgver"
+  python -m build --wheel --skip-dependency-check --no-isolation
+}
+
+check() {
+  cd "black-$pkgver"
+  python -m venv --system-site-packages test-env
+  test-env/bin/python -m install --optimize=1 dist/*.whl
+  chmod +x test-env/bin/black # https://github.com/FFY00/python-install/pull/6
+  PATH="$PWD/test-env/bin:$PATH" test-env/bin/python -m pytest --run-optional no_python2
+}
+
+package() {
+  cd "black-$pkgver"
+  python -m install --optimize=1 --destdir="$pkgdir" dist/*.whl
+
+  # https://github.com/FFY00/python-install/issues/7
+  sed -i 's/patched_main \[d]/patched_main/' "$pkgdir"/usr/bin/blackd
+
+  # https://github.com/FFY00/python-install/pull/6
+  chmod +x "$pkgdir"/usr/bin/*
+
+  # Symlink license file
+  local site_packages=$(python -c "import site; print(site.getsitepackages()[0])")
+  install -d "$pkgdir"/usr/share/licenses/$pkgname
+  ln -s "$site_packages"/black-$pkgver.dist-info/LICENSE \
+    "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
+}
+
+# vim:set ts=2 sw=2 et:



More information about the arch-commits mailing list