summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorMark Blakeney2022-10-09 22:38:01 +1000
committerMark Blakeney2022-10-09 22:38:01 +1000
commit227c72b58fd540a012ce7d7b99c6b71b93f153a5 (patch)
treea6b0fe64a8f3ca58a3a6e1ec2f568bf4364bf520
parentaf62caf0eacb34be9ac82eb2b97382af11e1f323 (diff)
downloadaur-227c72b58fd540a012ce7d7b99c6b71b93f153a5.tar.gz
Simplify PKGBUILD
-rw-r--r--.SRCINFO3
-rw-r--r--PKGBUILD29
2 files changed, 9 insertions, 23 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 06ea201ef68c..bee5bb857f39 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -5,7 +5,8 @@ pkgbase = pacpush
url = https://github.com/bulletmark/pacpush
arch = any
license = GPL3
- makedepends = python-pip
+ makedepends = python-build
+ makedepends = python-installer
makedepends = python-wheel
depends = python>=3.6
depends = rsync
diff --git a/PKGBUILD b/PKGBUILD
index ab6b31521bfd..a4101584d0ae 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -8,35 +8,20 @@ license=("GPL3")
arch=("any")
depends=("python>=3.6" "rsync" "sudo" "openssh" "python-requests"
"python-ruamel-yaml" "python-rich" "python-packaging")
-makedepends=("python-pip" "python-wheel")
+makedepends=(python-build python-installer python-wheel)
source=("$pkgname-$pkgver.tar.gz::$url/archive/$pkgver.tar.gz")
replaces=("pacsync")
conflicts=("pacsync")
sha1sums=('84f7c6a0b4130f08057112e766ff02ad548391a0')
-package() {
+build() {
cd "$srcdir/$pkgname-$pkgver"
+ python -m build --wheel --no-isolation
+}
- PIP_CONFIG_FILE=/dev/null pip install \
- --root="$pkgdir" \
- --isolated \
- --ignore-installed \
- --no-deps \
- --disable-pip-version-check \
- --no-python-version-warning \
- --no-warn-script-location \
- --no-cache-dir \
- --no-compile \
- --progress-bar=off \
- --root-user-action=ignore \
- .
-
- local pdir=$(python -c "import site; print(site.getsitepackages()[0])")
- local _pkgname="${pkgname//-/_}"
- cd "$pkgdir/$pdir"
- rm -f $_pkgname-*.dist-info/direct_url.json
- sed -i "/\/direct_url.json,/d" $_pkgname-*.dist-info/RECORD
- python -O -m compileall -q .
+package() {
+ cd "$srcdir/$pkgname-$pkgver"
+ python -m installer --destdir="$pkgdir" dist/*.whl
}
# vim:set ts=2 sw=2 et: