summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorjakob2024-05-25 00:02:16 +0200
committerjakob2024-05-25 00:03:31 +0200
commit75646c5a8ab3e703419cbd3c77c8a7b2d2bd0a93 (patch)
tree0c9fc525bb31b18d3221819f84f77a0dbeeaa916
parenteaadeebc9e39ace42daa63008592eced5e930cab (diff)
downloadaur-75646c5a8ab3e703419cbd3c77c8a7b2d2bd0a93.tar.gz
0.5.4-3: Change build from setuptools to pip
The "python setup.py install" method is deprecated [1] and replaced by "pip install ." However there's a bug[2] in pip since ~9 years which necessitates a hack so it does not try to uninstall the globally installed version. This bug triggers only when building on a system with this package previously installed with the _same_ pkgver (i.e. when rebuilding, or when the pkgrel is increased). [1] https://packaging.python.org/en/latest/discussions/setup-py-deprecated/ [2] https://github.com/pypa/pip/issues/3063 "install --root=... tries to remove previously globally installed version"
-rw-r--r--.SRCINFO4
-rw-r--r--PKGBUILD9
2 files changed, 8 insertions, 5 deletions
diff --git a/.SRCINFO b/.SRCINFO
index b931408b40c7..5d5b10b77295 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,14 +1,14 @@
pkgbase = servefile
pkgdesc = Serve or receive files from shell via a small HTTP server
pkgver = 0.5.4
- pkgrel = 2
+ pkgrel = 3
url = https://github.com/sebageek/servefile
arch = any
license = GPL3
checkdepends = python-pytest
checkdepends = python-pyopenssl
makedepends = git
- makedepends = python-setuptools
+ makedepends = python-pip
depends = python
optdepends = python-pyopenssl: HTTPS support
provides = servefile
diff --git a/PKGBUILD b/PKGBUILD
index b012352e1194..ad9859b3467f 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -3,14 +3,14 @@
pkgname=servefile
pkgver=0.5.4
-pkgrel=2
+pkgrel=3
pkgdesc="Serve or receive files from shell via a small HTTP server"
arch=('any')
url="https://github.com/sebageek/servefile"
license=('GPL3')
depends=('python')
optdepends=('python-pyopenssl: HTTPS support')
-makedepends=('git' 'python-setuptools')
+makedepends=('git' 'python-pip')
checkdepends=('python-pytest' 'python-pyopenssl')
provides=("${pkgname}")
conflicts=("${pkgname}")
@@ -24,6 +24,9 @@ check() {
package() {
cd "$srcdir/$pkgname-$pkgver"
- python setup.py install --root="$pkgdir/" --optimize=1
+ # See https://github.com/pypa/pip/issues/3063 for the
+ # reason behind "ignore-installed" & "--no-deps".
+ # tl;dr: It's an almost decade-old pip-bug...
+ python -m pip install --prefix="$pkgdir/" --ignore-installed --no-deps .
install -D servefile.1 "$pkgdir/usr/share/man/man1/servefile.1"
}