summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorLuis Martinez2022-07-03 18:05:30 -0500
committerLuis Martinez2022-07-03 18:05:30 -0500
commit5411b73fe61e28f5c4a1c039ac7c053165633f30 (patch)
tree5051478834ebd1906fc5486df2fe680ac1989f43
parent9aaf52356ff1647fd3efc9fab7c49ff7d3a6ddb0 (diff)
downloadaur-5411b73fe61e28f5c4a1c039ac7c053165633f30.tar.gz
package cleanup
-rw-r--r--.SRCINFO5
-rw-r--r--PKGBUILD21
2 files changed, 16 insertions, 10 deletions
diff --git a/.SRCINFO b/.SRCINFO
index a5340372f5d5..9c04f1954253 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,11 +1,14 @@
pkgbase = python-untwisted
pkgdesc = Event-driven framework for networking applications
pkgver = 3.2.2
- pkgrel = 2
+ pkgrel = 3
url = https://github.com/untwisted/untwisted
arch = any
license = MIT
+ makedepends = python-build
+ makedepends = python-installer
makedepends = python-setuptools
+ makedepends = python-wheel
depends = python
source = python-untwisted-3.2.2.tar.gz::https://github.com/untwisted/untwisted/archive/v3.2.2.tar.gz
sha256sums = ddee7f9d6c732eb210f3aeea4896ff34f795326a5b3401adb3814748d995f188
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/"
}