git » offpunk-git.git » commit 4299272

Switch to python-build build system

author Klaus Alexander Seistrup
2023-03-12 07:49:03 UTC
committer Klaus Alexander Seistrup
2023-03-12 07:49:03 UTC
parent 67acbb8eb18a22c16dee045ce7a7456a34206732

Switch to python-build build system

See the link below for details:
https://lists.sr.ht/~lioploum/offpunk-devel/%3C20230312065614.19254-1-cyber%2Bmisc%40sysrq.in%3E

.SRCINFO +5 -3
PKGBUILD +13 -5

diff --git a/.SRCINFO b/.SRCINFO
index fc3c70c..1c25b5b 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,14 +1,16 @@
 pkgbase = offpunk-git
 	pkgdesc = Fork of the command-line Gemini client AV-98 with added offline capabilities
-	pkgver = 1.9.r1.g1333d1b
-	pkgrel = 1
+	pkgver = 1.9.1.r1.g826aa4e
+	pkgrel = 2
 	epoch = 2
 	url = https://git.sr.ht/~lioploum/offpunk
 	arch = any
 	license = BSD
 	makedepends = coreutils
 	makedepends = git
-	makedepends = python-setuptools
+	makedepends = python-build
+	makedepends = python-installer
+	makedepends = python-wheel
 	depends = python
 	depends = file
 	depends = less
diff --git a/PKGBUILD b/PKGBUILD
index fe33e58..b60c5ba 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,10 +1,11 @@
 # Maintainer: Klaus Alexander Seistrup <klaus@seistrup.dk>
+# Contributor: Anna <cyber AT sysrq DOT in>
 # -*- sh -*-
 
 pkgname='offpunk-git'
 _pkgname='offpunk'
-pkgver=1.9.r1.g1333d1b
-pkgrel=1
+pkgver=1.9.1.r1.g826aa4e
+pkgrel=2
 epoch=2
 pkgdesc='Fork of the command-line Gemini client AV-98 with added offline capabilities'
 arch=('any')
@@ -19,7 +20,9 @@ depends=(
 makedepends=(
   'coreutils'
   'git'
-  'python-setuptools'
+  'python-build'
+  'python-installer'
+  'python-wheel'
 )
 optdepends=(
   'chafa: chafa and ansiwrap are required to render images in terminal'
@@ -49,11 +52,16 @@ pkgver() {
   git describe --long | sed 's/\([^-]*-g\)/r\1/;s/-/./g;s/^v//g'
 }
 
+build() {
+  cd "$_pkgname" || exit 1
+
+  python -m build --wheel --no-isolation
+}
+
 package() {
   cd "$_pkgname" || exit 1
 
-  umask 0022
-  python setup.py install --root="$pkgdir" --prefix='/usr' --optimize=1
+  python -m installer --destdir="$pkgdir" dist/*.whl
 
   test -f man/offpunk.1 && \
   install -Dm0644 man/offpunk.1 "$pkgdir/usr/share/man/man1/offpunk.1"