testing/py3-python-stdnum: build with gpep517

This commit is contained in:
ptrcnull 2024-08-06 15:00:32 +02:00
parent 0f40abb88f
commit 904951c8b4

View File

@ -3,31 +3,36 @@
pkgname=py3-python-stdnum pkgname=py3-python-stdnum
_pkgname=python-stdnum _pkgname=python-stdnum
pkgver=1.19 pkgver=1.19
pkgrel=1 pkgrel=2
pkgdesc="Python module to handle standardized numbers and codes" pkgdesc="Python module to handle standardized numbers and codes"
url="https://arthurdejong.org/python-stdnum" url="https://arthurdejong.org/python-stdnum"
arch="noarch" arch="noarch"
license="LGPL-2.0-or-later" license="LGPL-2.0-or-later"
depends="python3" depends="python3"
makedepends="py3-setuptools" makedepends="py3-setuptools py3-gpep517"
checkdepends="py3-coverage py3-nose" checkdepends="py3-coverage py3-nose"
subpackages="$pkgname-pyc" subpackages="$pkgname-pyc"
source="https://files.pythonhosted.org/packages/source/${_pkgname:0:1}/$_pkgname/$_pkgname-$pkgver.tar.gz" source="https://files.pythonhosted.org/packages/source/${_pkgname:0:1}/$_pkgname/$_pkgname-$pkgver.tar.gz"
builddir="$srcdir"/$_pkgname-$pkgver builddir="$srcdir"/$_pkgname-$pkgver
replaces="py-stdnum" # Backwards compatibility replaces="py-stdnum" # Backwards compatibility
provides="py-stdnum=$pkgver-r$pkgrel" # Backwards compatibility provides="py-stdnum=$pkgver-r$pkgrel" # Backwards compatibility
build() { build() {
python3 setup.py build gpep517 build-wheel \
--wheel-dir .dist \
--output-fd 3 3>&1 >&2
} }
check() { check() {
nosetests python3 -m venv --clear --without-pip --system-site-packages .testenv
gpep517 install-wheel --destdir .testenv --prefix '' .dist/*.whl
.testenv/bin/python3 -m nose
} }
package() { package() {
python3 setup.py install --skip-build --root="$pkgdir" gpep517 install-wheel --destdir "$pkgdir" \
.dist/*.whl
} }
sha512sums=" sha512sums="