[arch-commits] Commit in python-build/trunk (PKGBUILD)

Daniel M. Capella polyzen at gemini.archlinux.org
Tue Sep 6 22:44:08 UTC 2022


    Date: Tuesday, September 6, 2022 @ 22:44:07
  Author: polyzen
Revision: 1296001

upgpkg: python-build 0.8.0-2: Use PEP 517

Modified:
  python-build/trunk/PKGBUILD

----------+
 PKGBUILD |   16 ++++++++++------
 1 file changed, 10 insertions(+), 6 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2022-09-06 22:33:39 UTC (rev 1296000)
+++ PKGBUILD	2022-09-06 22:44:07 UTC (rev 1296001)
@@ -1,9 +1,10 @@
 # Maintainer: Filipe Laíns (FFY00) <lains at archlinux.org>
+# Maintainer: Daniel M. Capella <polyzen at archlinux.org>
 
 _pkgname=build
 pkgname=python-$_pkgname
 pkgver=0.8.0
-pkgrel=1
+pkgrel=2
 pkgdesc='A simple, correct PEP 517 build frontend'
 arch=('any')
 url='https://github.com/pypa/build'
@@ -10,7 +11,7 @@
 license=('MIT')
 depends=('python-tomli' 'python-pep517' 'python-packaging')
 optdepends=('python-virtualenv: Use virtualenv for build isolation')
-makedepends=('git' 'python-setuptools'
+makedepends=('git' 'python-build' 'python-installer' 'python-setuptools' 'python-wheel'
              'python-sphinx' 'python-sphinx-argparse-cli' 'python-sphinx-autodoc-typehints' 'python-sphinx-furo')
 checkdepends=('python-pytest' 'python-pytest-mock' 'python-pytest-rerunfailures' 'python-filelock' 'python-toml' 'python-wheel')
 source=("git+$url#tag=$pkgver?signed")
@@ -20,7 +21,7 @@
 build() {
   cd $_pkgname
 
-  python setup.py build
+  python -m build --wheel --skip-dependency-check --no-isolation
 
   PYTHONPATH=src sphinx-build -b dirhtml -v docs docs/build/html
 }
@@ -34,12 +35,15 @@
 package() {
   cd $_pkgname
 
-  python setup.py install --root="$pkgdir" --skip-build
-  python -m compileall --invalidation-mode=checked-hash "$pkgdir"
+  python -m installer --destdir="$pkgdir" dist/*.whl
 
   install -dm 755 "$pkgdir"/usr/share/doc/$pkgname
   cp -r -a --no-preserve=ownership docs/build/html "$pkgdir"/usr/share/doc/$pkgname
   rm -rf "$pkgdir"/usr/share/doc/$pkgname/html/.doctrees
 
-  install -Dm 644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
+  # 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"/$_pkgname-$pkgver.dist-info/LICENSE \
+    "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
 }



More information about the arch-commits mailing list