diff options
author | Luis Martinez | 2022-03-04 10:08:44 -0600 |
---|---|---|
committer | Luis Martinez | 2022-03-04 10:08:44 -0600 |
commit | cb5bb78a85cbea631bebef3f852bd16ad9a9703f (patch) | |
tree | f39431642ce856398165efc780e1d30861349e5a | |
parent | b573b37bffa21014522afc45d24a727bc7ed25a0 (diff) | |
download | aur-cb5bb78a85cbea631bebef3f852bd16ad9a9703f.tar.gz |
update PKGBUILD according to new Python packaging guidelines
-rw-r--r-- | .SRCINFO | 7 | ||||
-rw-r--r-- | PKGBUILD | 13 |
2 files changed, 12 insertions, 8 deletions
@@ -1,13 +1,16 @@ pkgbase = python-google-crc32c pkgdesc = Wraps Google's crc32c library into a Python wrapper pkgver = 1.3.0 - pkgrel = 2 + pkgrel = 3 url = https://github.com/googleapis/python-crc32c arch = x86_64 license = APACHE checkdepends = python-pytest makedepends = python-setuptools - depends = python>=3.6 + makedepends = python-build + makedepends = python-installer + makedepends = python-wheel + depends = python depends = google-crc32c source = python-google-crc32c-1.3.0.tar.gz::https://github.com/googleapis/python-crc32c/archive/v1.3.0.tar.gz sha256sums = 573d5f16a2c8e7cb8eab5e962f2aca6dd4a684178f9803e1c5ca2914bf023afa @@ -3,13 +3,13 @@ pkgname=python-google-crc32c pkgver=1.3.0 -pkgrel=2 +pkgrel=3 pkgdesc="Wraps Google's crc32c library into a Python wrapper" arch=('x86_64') url="https://github.com/googleapis/python-crc32c" license=('APACHE') -depends=('python>=3.6' 'google-crc32c') -makedepends=('python-setuptools') +depends=('python' 'google-crc32c') +makedepends=('python-setuptools' 'python-build' 'python-installer' 'python-wheel') checkdepends=('python-pytest') source=("$pkgname-$pkgver.tar.gz::$url/archive/v$pkgver.tar.gz") sha256sums=('573d5f16a2c8e7cb8eab5e962f2aca6dd4a684178f9803e1c5ca2914bf023afa') @@ -17,17 +17,18 @@ sha256sums=('573d5f16a2c8e7cb8eab5e962f2aca6dd4a684178f9803e1c5ca2914bf023afa') build() { export CRC32C_INSTALL_PREFIX=/usr cd "python-crc32c-$pkgver" - python setup.py build + python -m build --wheel --no-isolation } check() { cd "python-crc32c-$pkgver" local _ver="$(python -c 'import sys; print(".".join(map(str, sys.version_info[:2])))')" - PYTHONPATH="$PWD/build/lib.linux-$CARCH-$_ver" pytest tests + PYTHONPATH="$PWD/build/lib.linux-$CARCH-$_ver" pytest -x tests } package() { + export PYTHONHASHSEED=0 cd "python-crc32c-$pkgver" - PYTHONHASHSEED=0 python setup.py install --root="$pkgdir/" --optimize=1 --skip-build + python -m installer --destdir="$pkgdir/" dist/*.whl install -Dm644 README.md SECURITY.md -t "$pkgdir/usr/share/doc/$pkgname/" } |