summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorMark Blakeney2022-10-10 09:51:26 +1000
committerMark Blakeney2022-10-10 09:51:26 +1000
commit768b99eabe1de3b731aa6b0618b5ccf47cbf4594 (patch)
tree2ee852449f69492961cb0d40da590643d0d4f346 /PKGBUILD
parentd82e597fab6a1a9bc455e5974c4ddcf95b3d161d (diff)
downloadaur-768b99eabe1de3b731aa6b0618b5ccf47cbf4594.tar.gz
Simplify PKGBUILD
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD33
1 files changed, 9 insertions, 24 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 873b17a21595..c7fe70c269de 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -4,36 +4,21 @@ pkgver=1.5
pkgrel=1
pkgdesc='Utility to perform commands on PDF files.'
url="https://github.com/bulletmark/$pkgname"
-license=("GPL3")
-arch=("any")
+license=(GPL3)
+arch=(any)
depends=("python>=3.5" "python-pypdf2>=2.0.0")
-makedepends=("python-pip" "python-wheel")
+makedepends=(python-setuptools python-build python-installer python-wheel)
source=("$pkgname-$pkgver.tar.gz::$url/archive/$pkgver.tar.gz")
sha1sums=('136f3418de657fffc888a6d73c8f4cc4dae131bc')
-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: