diff options
author | Luis Martinez | 2022-03-11 21:13:33 -0600 |
---|---|---|
committer | Luis Martinez | 2022-03-11 21:13:33 -0600 |
commit | 54b616ed2861769beefd576e8457d8455648be4c (patch) | |
tree | 3d5e5893b8a6d97df7d8bba4776888387ed951c4 | |
parent | ed330b5007a23a36e95ef5030754dc16a6a36f63 (diff) | |
download | aur-54b616ed2861769beefd576e8457d8455648be4c.tar.gz |
use updated python packaging guidelines
-rw-r--r-- | .SRCINFO | 5 | ||||
-rw-r--r-- | PKGBUILD | 23 |
2 files changed, 21 insertions, 7 deletions
@@ -1,13 +1,16 @@ pkgbase = python-quicktions pkgdesc = Fast fractions implementation in Cython pkgver = 1.13 - pkgrel = 1 + pkgrel = 2 url = https://github.com/scoder/quicktions changelog = CHANGES.rst arch = x86_64 license = Python makedepends = python-setuptools makedepends = cython + makedepends = python-build + makedepends = python-installer + makedepends = python-wheel depends = glibc source = python-quicktions-1.13.tar.gz::https://github.com/scoder/quicktions/archive/1.13.tar.gz sha256sums = 4dfbe8dee81099deb28059aeeed72e7b47e22c4204be4ad52aef501b49bd21e7 @@ -2,13 +2,18 @@ pkgname=python-quicktions pkgver=1.13 -pkgrel=1 +pkgrel=2 pkgdesc="Fast fractions implementation in Cython" arch=('x86_64') url="https://github.com/scoder/quicktions" license=('Python') depends=('glibc') -makedepends=('python-setuptools' 'cython') +makedepends=( + 'python-setuptools' + 'cython' + 'python-build' + 'python-installer' + 'python-wheel') # checkdepends=('python-pytest') changelog=CHANGES.rst source=("$pkgname-$pkgver.tar.gz::$url/archive/$pkgver.tar.gz") @@ -16,18 +21,24 @@ sha256sums=('4dfbe8dee81099deb28059aeeed72e7b47e22c4204be4ad52aef501b49bd21e7') build() { cd "quicktions-$pkgver" - make + # needs to build src/quicktions.c first + python setup.py build_ext --inplace --with-cython + python -m build --wheel --no-isolation } ## tests segfault # check() { # cd "quicktions-$pkgver" -# make test +# local _py="$(python -c 'import sys; print(".".join(map(str, sys.version_info[:2])))')" +# PYTHONPATH="$PWD/build/lib.linux-$CARCH-$_py" pytest -x # } package() { export PYTHONHASHSEED=0 cd "quicktions-$pkgver" - python setup.py install --root="$pkgdir/" --optimize=1 --skip-build - install -Dm644 LICENSE -t "$pkgdir/usr/share/licenses/$pkgname/" + python -m installer --destdir="$pkgdir/" dist/*.whl + + local _site="$(python -c 'import site; print(site.getsitepackages()[0])')" + install -d "$pkgdir/usr/share/licenses/$pkgname/" + ln -s "$_site/quicktions-$pkgver.dist-info/LICENSE" "$pkgdir/usr/share/licenses/$pkgname/" } |