diff --git a/community/py3-pkcs11/APKBUILD b/community/py3-pkcs11/APKBUILD index 89af013510f..a25433ff915 100644 --- a/community/py3-pkcs11/APKBUILD +++ b/community/py3-pkcs11/APKBUILD @@ -3,7 +3,7 @@ pkgname=py3-pkcs11 _pkgname=python-pkcs11 pkgver=0.7.0 -pkgrel=5 +pkgrel=6 pkgdesc="PKCS#11/Cryptoki support for Python" url="https://github.com/danni/python-pkcs11" arch="all" @@ -15,7 +15,9 @@ checkdepends=" " makedepends=" cython + py3-gpep517 py3-setuptools_scm + py3-wheel python3-dev " depends=" @@ -37,7 +39,9 @@ builddir="$srcdir/$_pkgname-$pkgver" build() { export SETUPTOOLS_SCM_PRETEND_VERSION=$pkgver - python3 setup.py build + gpep517 build-wheel \ + --wheel-dir .dist \ + --output-fd 3 3>&1 >&2 } check() { @@ -59,17 +63,19 @@ EOF # do test installation export SETUPTOOLS_SCM_PRETEND_VERSION=$pkgver - python3 setup.py install --root="$builddir"/test_install --skip-build - PYTHONPATH="$(echo "$builddir"/test_install/usr/lib/python3*/site-packages)" - export PYTHONPATH + python3 -m venv --clear --without-pip --system-site-packages .testenv + .testenv/bin/python3 -m installer .dist/*.whl # run tests + local _python_version + _python_version="$(python3 -c 'import sys; print(".".join(map(str, sys.version_info[:2])))')" + PYTHONPATH="$builddir/.testenv/lib/python$_python_version/site-packages" \ pytest-3 --import-mode=append } package() { export SETUPTOOLS_SCM_PRETEND_VERSION=$pkgver - python3 setup.py install --skip-build --root="$pkgdir" + python3 -m installer -d "$pkgdir" .dist/*.whl } sha512sums="