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

Daniel M. Capella polyzen at gemini.archlinux.org
Tue Sep 6 05:23:05 UTC 2022


    Date: Tuesday, September 6, 2022 @ 05:23:05
  Author: polyzen
Revision: 1294176

upgpkg: python-pyee 9.0.4-2: Use PEP 517

Modified:
  python-pyee/trunk/PKGBUILD

----------+
 PKGBUILD |   18 ++++++++++++------
 1 file changed, 12 insertions(+), 6 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2022-09-06 05:19:19 UTC (rev 1294175)
+++ PKGBUILD	2022-09-06 05:23:05 UTC (rev 1294176)
@@ -3,13 +3,14 @@
 
 pkgname=python-pyee
 pkgver=9.0.4
-pkgrel=1
+pkgrel=2
 pkgdesc="Port of node.js's EventEmitter to python"
 arch=('any')
 url=https://github.com/jfhbrook/pyee
 license=('MIT')
 depends=('python-typing-extensions')
-makedepends=('python-setuptools')
+makedepends=('python-build' 'python-installer' 'python-setuptools'
+             'python-wheel')
 checkdepends=('python-mock' 'python-pytest-asyncio' 'python-pytest-trio'
               'python-twisted')
 optdepends=('python-trio' 'python-twisted')
@@ -25,18 +26,23 @@
 
 build() {
   cd pyee-$pkgver
-  python setup.py build
+  python -m build --wheel --skip-dependency-check --no-isolation
 }
 
 check() {
   cd pyee-$pkgver
   python -m venv --system-site-packages test-env
-  test-env/bin/python setup.py install --optimize=1 --skip-build
+  test-env/bin/python -m installer dist/*.whl
   test-env/bin/python -m pytest
 }
 
 package() {
   cd pyee-$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"/pyee-$pkgver.dist-info/LICENSE \
+    "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
 }



More information about the arch-commits mailing list