diff options
author | Luis Martinez | 2022-07-03 18:05:30 -0500 |
---|---|---|
committer | Luis Martinez | 2022-07-03 18:05:30 -0500 |
commit | 5411b73fe61e28f5c4a1c039ac7c053165633f30 (patch) | |
tree | 5051478834ebd1906fc5486df2fe680ac1989f43 /PKGBUILD | |
parent | 9aaf52356ff1647fd3efc9fab7c49ff7d3a6ddb0 (diff) | |
download | aur-python-untwisted.tar.gz |
package cleanup
Diffstat (limited to 'PKGBUILD')
-rw-r--r-- | PKGBUILD | 21 |
1 files changed, 12 insertions, 9 deletions
@@ -2,30 +2,33 @@ # Contributor: Dimitris Kiziridis <ragouel at outlook dot com> pkgname=python-untwisted +_pkg="${pkgname#python-}" pkgver=3.2.2 -pkgrel=2 +pkgrel=3 pkgdesc='Event-driven framework for networking applications' arch=('any') url="https://github.com/untwisted/untwisted" license=('MIT') depends=('python') -makedepends=('python-setuptools') +makedepends=('python-build' 'python-installer' 'python-setuptools' 'python-wheel') source=("$pkgname-$pkgver.tar.gz::$url/archive/v$pkgver.tar.gz") sha256sums=('ddee7f9d6c732eb210f3aeea4896ff34f795326a5b3401adb3814748d995f188') build() { - cd "untwisted-$pkgver" - python setup.py build + cd "$_pkg-$pkgver" + python -m build --wheel --no-isolation } check() { - cd "untwisted-$pkgver" + cd "$_pkg-$pkgver" python tests.py } package() { - cd "untwisted-$pkgver" - python setup.py install --root="$pkgdir/" --optimize=1 --skip-build - install -Dm 644 LICENSE -t "$pkgdir/usr/share/licenses/$pkgname/" - install -Dm 644 README.md -t "$pkgdir/usr/share/doc/$pkgname/" + cd "$_pkg-$pkgver" + PYTHONHASHSEED=0 python -m installer --destdir="$pkgdir" dist/*.whl + install -Dm644 README.md -t "$pkgdir/usr/share/doc/$pkgname/" + local _site="$(python -c 'import site; print(site.getsitepackages()[0])')" + install -d "$pkgdir/usr/share/licenses/$pkgname/" + ln -s "$_site/$_pkg-$pkgver.dist-info/LICENSE" "$pkgdir/usr/share/licenses/$pkgname/" } |