main/py3-extras: switch to gpep517

This commit is contained in:
Celeste 2023-10-27 03:09:04 +00:00 committed by Leonardo Arena
parent c305c34d18
commit c545211653

View File

@ -3,13 +3,13 @@
pkgname=py3-extras
_pkgname=extras
pkgver=1.0.0
pkgrel=8
pkgrel=9
pkgdesc="Useful extra bits for Python - things that shold be in the standard library"
url="https://pypi.org/project/extras/"
arch="noarch"
license="MIT"
depends="python3"
makedepends="py3-setuptools"
makedepends="py3-gpep517 py3-setuptools py3-wheel"
checkdepends="py3-testtools"
subpackages="$pkgname-pyc"
source="https://files.pythonhosted.org/packages/source/${_pkgname:0:1}/$_pkgname/$_pkgname-$pkgver.tar.gz"
@ -19,15 +19,20 @@ provides="py-extras=$pkgver-r$pkgrel" # Backwards Compatibility
options="!check" # py3-testtools depends on this
build() {
python3 setup.py build
gpep517 build-wheel \
--wheel-dir .dist \
--output-fd 3 3>&1 >&2
}
check() {
python3 setup.py test
python3 -m venv --clear --without-pip --system-site-packages .testenv
.testenv/bin/python3 -m installer .dist/*.whl
.testenv/bin/python3 -m unittest -v
}
package() {
python3 setup.py install --skip-build --root="$pkgdir"
python3 -m installer -d "$pkgdir" \
.dist/*.whl
}
sha512sums="