Skip to content

Commit b2c0479

Browse files
committed
use PEP 517 build for PKGBUILD
1 parent 8bf39a5 commit b2c0479

File tree

2 files changed

+15
-2
lines changed

2 files changed

+15
-2
lines changed

contrib/PKGBUILD

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ license=('GPL')
99
sha512sums=('SKIP')
1010
arch=('any')
1111
depends=('python' 'python-pyxdg' 'python-click')
12-
makedepends=('git' 'python-setuptools' 'scdoc')
12+
makedepends=('git' 'python-build' 'python-installer' 'python-wheel' 'python-setuptools' 'scdoc')
1313
provides=('qbpm')
1414
source=("git+https://github.com/pvsr/qbpm")
1515

@@ -18,6 +18,15 @@ pkgver() {
1818
git describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
1919
}
2020

21+
prepare() {
22+
git -C "${srcdir}/qbpm" clean -dfx
23+
}
24+
25+
build() {
26+
cd qbpm
27+
python -m build --wheel --no-isolation
28+
}
29+
2130
package() {
2231
cd qbpm
2332
install -D -m644 completions/qbpm.fish ${pkgdir}/usr/share/fish/vendor_completions.d/qbpm.fish
@@ -26,5 +35,5 @@ package() {
2635
scdoc < qbpm.1.scd > qbpm.1
2736
install -D -m644 qbpm.1 ${pkgdir}/usr/share/man/man1/qbpm.1
2837

29-
python setup.py install --root="$pkgdir" --optimize=1
38+
python -m installer --destdir="$pkgdir" dist/*.whl
3039
}

pyproject.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,10 @@ repository = "https://github.com/pvsr/qbpm"
2626
[project.scripts]
2727
qbpm = "qbpm.main:main"
2828

29+
[build-system]
30+
requires = ["setuptools"]
31+
build-backend = "setuptools.build_meta"
32+
2933
[tool.setuptools]
3034
packages = ["qbpm"]
3135

0 commit comments

Comments
 (0)