testing/py3-sphinx-argparse: build with py3-build

This commit is contained in:
psykose 2022-04-07 23:53:38 +00:00
parent 6aff82b07b
commit fc53f61d91
No known key found for this signature in database

View File

@ -1,20 +1,21 @@
# Maintainer: Keith Toh <ktprograms@gmail.com>
pkgname=py3-sphinx-argparse
pkgver=0.3.1
pkgrel=0
pkgrel=1
pkgdesc="Sphinx extension that automatically documents argparse commands and options"
url="https://sphinx-argparse.readthedocs.io/en/latest/"
arch="noarch"
license="MIT"
depends="python3 py3-sphinx"
makedepends="py3-setuptools pyproject2setuppy"
makedepends="py3-build py3-installer py3-poetry-core py3-wheel"
checkdepends="py3-pytest"
source="sphinx-argparse-$pkgver.tar.gz::https://github.com/ashb/sphinx-argparse/archive/refs/tags/$pkgver.tar.gz
fix-python3.10-tests.patch"
fix-python3.10-tests.patch"
builddir="$srcdir/sphinx-argparse-$pkgver"
build() {
python3 -m pyproject2setuppy.main build
# XXX: hack for poetry to not ignore files
GIT_DIR=. python3 -m build --no-isolation --wheel
}
check() {
@ -22,7 +23,8 @@ check() {
}
package() {
python3 -m pyproject2setuppy.main install --prefix=/usr --root="$pkgdir"
python3 -m installer -d "$pkgdir" \
dist/sphinx_argparse-$pkgver-py2.py3-none-any.whl
install -Dm644 LICENSE -t "$pkgdir"/usr/share/licenses/$pkgname/
}