summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorLuis Martinez2022-07-03 18:05:30 -0500
committerLuis Martinez2022-07-03 18:05:30 -0500
commit5411b73fe61e28f5c4a1c039ac7c053165633f30 (patch)
tree5051478834ebd1906fc5486df2fe680ac1989f43 /PKGBUILD
parent9aaf52356ff1647fd3efc9fab7c49ff7d3a6ddb0 (diff)
downloadaur-python-untwisted.tar.gz
package cleanup
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD21
1 files changed, 12 insertions, 9 deletions
diff --git a/PKGBUILD b/PKGBUILD
index a18d9d23ecdb..f8c2e5d15d32 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -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/"
}