summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorwilli2024-05-02 20:23:34 +0200
committerwilli2024-05-02 20:23:34 +0200
commite21f18bd316d8c84d2a0432e842325040a1b5370 (patch)
treef07e12808379fc8538aa2e4107d1fc364a54eb65
parent17057eb56ac79a9f01df795a1bd17aba1db7c90d (diff)
downloadaur-e21f18bd316d8c84d2a0432e842325040a1b5370.tar.gz
ditch depracted python setup.y and use python -m build/installer instead
-rw-r--r--.SRCINFO4
-rw-r--r--PKGBUILD15
2 files changed, 9 insertions, 10 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 3999bb52a4bf..e216bf1c9cec 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -5,7 +5,9 @@ pkgbase = python-libnmap
url = https://github.com/savon-noir/python-libnmap
arch = any
license = Apache-2.0
- makedepends = python-setuptools
+ makedepends = python-build
+ makedepends = python-installer
+ makedepends = python-wheel
depends = python
optdepends = python-sqlalchemy
optdepends = python-pymongo
diff --git a/PKGBUILD b/PKGBUILD
index 9502b20ebc7d..bb07995d7858 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -9,20 +9,17 @@ arch=('any')
url="https://github.com/savon-noir/python-libnmap"
license=('Apache-2.0')
depends=('python')
-optdepends=('python-sqlalchemy' 'python-pymongo' 'python-boto')
-makedepends=('python-setuptools')
+optdepends=('python-sqlalchemy' 'python-pymongo' 'python-boto' 'python-defusedxml')
+makedepends=(python-build python-installer python-wheel)
source=("https://files.pythonhosted.org/packages/source/p/${pkgname}/${pkgname}-${pkgver}.tar.gz")
sha256sums=('d03629256c2ee9ab37390c28d4c4c2ae9637cd0861dd8ab9e0f32779545936c0')
build() {
- cd "$srcdir/$pkgname-$pkgver"
- python setup.py build
+ cd $pkgname-$pkgver
+ python -m build --wheel --no-isolation
}
package() {
- cd "$srcdir/$pkgname-$pkgver"
- python setup.py install --root=$pkgdir --optimize=1 --skip-build
-
- cd "$srcdir"
- install -d "$pkgdir/usr/share/licenses/$pkgname"
+ cd $pkgname-$pkgver
+ python -m installer --destdir="$pkgdir" dist/*.whl
}