summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorKlaus Alexander Seistrup2023-03-12 09:11:10 +0100
committerKlaus Alexander Seistrup2023-03-12 09:11:10 +0100
commitdea298e68c02d361952eb44096375f6b3c3c1960 (patch)
tree0b3c27bceec17d3f8e2a895132581ab13864ca17
parent7dd937cbe80ebf92743c9c3d76492c075e9037e3 (diff)
downloadaur-dea298e68c02d361952eb44096375f6b3c3c1960.tar.gz
Switch to standards based (PEP 517) packaging
https://wiki.archlinux.org/title/Python_package_guidelines
-rw-r--r--.SRCINFO7
-rw-r--r--PKGBUILD11
2 files changed, 10 insertions, 8 deletions
diff --git a/.SRCINFO b/.SRCINFO
index f871e27f2b8c..de38020d75f2 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,12 +1,13 @@
pkgbase = python-metno-locationforecast
pkgdesc = Python interface for the MET Norway Locationforecast/2.0 weather service
pkgver = 1.1.0
- pkgrel = 1
+ pkgrel = 2
url = https://github.com/Rory-Sullivan/metno-locationforecast
arch = any
license = MIT
- makedepends = python-setuptools
- depends = python
+ makedepends = python-build
+ makedepends = python-installer
+ makedepends = python-wheel
depends = python-requests
conflicts = python-metno-locationforecast
conflicts = python-metno-locationforecast-git
diff --git a/PKGBUILD b/PKGBUILD
index d3323209d714..70c603375068 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -4,7 +4,7 @@
pkgname='python-metno-locationforecast'
_pkgname="${pkgname#python-}"
pkgver=1.1.0
-pkgrel=1
+pkgrel=2
pkgdesc='Python interface for the MET Norway Locationforecast/2.0 weather service'
arch=('any')
license=('MIT')
@@ -14,11 +14,12 @@ source=(
'setup-py.diff'
)
depends=(
- 'python'
'python-requests'
)
makedepends=(
- 'python-setuptools'
+ 'python-build'
+ 'python-installer'
+ 'python-wheel'
)
provided=("$pkgname")
conflicts=("$pkgname" "$pkgname-git")
@@ -44,13 +45,13 @@ prepare() {
build() {
cd "$srcdir/$_pkgname-$pkgver" || exit 1
- python setup.py build
+ python -m build --wheel --no-isolation
}
package() {
cd "$srcdir/$_pkgname-$pkgver" || exit 1
- python setup.py install --root="$pkgdir" --prefix=/usr --optimize=1 --skip-build
+ python -m installer --destdir="$pkgdir" dist/*.whl
install -Dm0644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"