summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Gehr2024-04-23 14:50:20 +0200
committerStefan Gehr2024-04-23 14:50:20 +0200
commit828a1851ab8caa3122eea71914a92c890f8fedc1 (patch)
treeae125e3079335e1e9e5763bb132245feb86f5529
parent5610ed818415659755e57b547fd960df9b7055a8 (diff)
downloadaur-828a1851ab8caa3122eea71914a92c890f8fedc1.tar.gz
Use recommended build and install procedure
https://wiki.archlinux.org/title/Python_package_guidelines#Standards_based_(PEP_517)
-rw-r--r--.SRCINFO3
-rw-r--r--PKGBUILD6
2 files changed, 6 insertions, 3 deletions
diff --git a/.SRCINFO b/.SRCINFO
index a6d527a967bf..3349f2a69d83 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -6,6 +6,9 @@ pkgbase = python-speedport-api
arch = any
license = MIT
makedepends = git
+ makedepends = python-build
+ makedepends = python-installer
+ makedepends = python-wheel
makedepends = python-setuptools
makedepends = python-pylint
makedepends = mypy
diff --git a/PKGBUILD b/PKGBUILD
index b7ff4cb61952..a22fc4fc2906 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -8,17 +8,17 @@ arch=(any)
url="https://github.com/Andre0512/speedport-api"
license=(MIT)
depends=(python-aiohttp python-pycryptodome)
-makedepends=(git python-setuptools python-pylint mypy flake8 python-black)
+makedepends=(git python-build python-installer python-wheel python-setuptools python-pylint mypy flake8 python-black)
source=("${pkgname}-${pkgver}.tar.gz::${url}/archive/refs/tags/v${pkgver}.tar.gz")
b2sums=("dc51548de5e6271f31e087cf8ba61e637b3156ad5695d2bb98efe692c423be5d65eda4ad57bce9da43b1ee0343233cd41eb5e7e17b57f9eb41823ae2a96b052b")
build() {
cd speedport-api-${pkgver}
- python setup.py build
+ python -m build --wheel --no-isolation
}
package() {
cd speedport-api-${pkgver}
- python setup.py install --root="$pkgdir" --optimize=1
+ python -m installer --destdir="$pkgdir" dist/*.whl
install -D -m644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
}