mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2026-05-05 04:16:46 +02:00
community/py3-pkcs11: build with gpep517
This commit is contained in:
parent
3cdfb062cf
commit
f3b2bafcbf
@ -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="
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user