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

Daniel M. Capella polyzen at gemini.archlinux.org
Sun Sep 4 18:56:56 UTC 2022


    Date: Sunday, September 4, 2022 @ 18:56:56
  Author: polyzen
Revision: 1292875

upgpkg: python-dkim 1.0.5-7: Use PEP 517

Modified:
  python-dkim/trunk/PKGBUILD

----------+
 PKGBUILD |   16 +++++++++++-----
 1 file changed, 11 insertions(+), 5 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2022-09-04 18:53:15 UTC (rev 1292874)
+++ PKGBUILD	2022-09-04 18:56:56 UTC (rev 1292875)
@@ -2,13 +2,14 @@
 
 pkgname=python-dkim
 pkgver=1.0.5
-pkgrel=6
+pkgrel=7
 pkgdesc='Python library that implements DKIM and ARC email signing and verification'
 arch=('any')
 url=https://launchpad.net/dkimpy
 license=('ZLIB')
 depends=('python-dnspython')
-makedepends=('python-setuptools')
+makedepends=('python-build' 'python-installer' 'python-setuptools'
+             'python-wheel')
 checkdepends=('python-authres' 'python-pynacl')
 optdepends=('python-aiodns' 'python-authres' 'python-pynacl')
 source=("https://files.pythonhosted.org/packages/source/d/dkimpy/dkimpy-$pkgver.tar.gz")
@@ -16,7 +17,7 @@
 
 build() {
   cd dkimpy-$pkgver
-  python setup.py build
+  python -m build --wheel --skip-dependency-check --no-isolation
 }
 
 check() {
@@ -26,6 +27,11 @@
 
 package() {
   cd dkimpy-$pkgver
-  python setup.py install --root="$pkgdir" --optimize=1 --skip-build
-  install -Dm644 -t "$pkgdir"/usr/share/licenses/$pkgname LICENSE
+  python -m installer --destdir="$pkgdir" dist/*.whl
+
+  # 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"/dkimpy-$pkgver.dist-info/LICENSE \
+    "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
 }



More information about the arch-commits mailing list