aboutsummaryrefslogtreecommitdiffstats
path: root/testing/py3-libnacl/APKBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'testing/py3-libnacl/APKBUILD')
-rw-r--r--testing/py3-libnacl/APKBUILD33
1 files changed, 23 insertions, 10 deletions
diff --git a/testing/py3-libnacl/APKBUILD b/testing/py3-libnacl/APKBUILD
index f9656944ba7..09f7740fabb 100644
--- a/testing/py3-libnacl/APKBUILD
+++ b/testing/py3-libnacl/APKBUILD
@@ -1,30 +1,43 @@
# Contributor: Fabian Affolter <fabian@affolter-engineering.ch>
# Maintainer: Fabian Affolter <fabian@affolter-engineering.ch>
pkgname=py3-libnacl
-_pkgname=libnacl
-pkgver=1.6.1
-pkgrel=3
+pkgver=2.1.0
+pkgrel=1
pkgdesc="Python bindings for libsodium/tweetnacl"
url="https://libnacl.readthedocs.org/"
arch="noarch"
license="Apache-2.0"
-makedepends="py3-setuptools libsodium-dev"
-source="$_pkgname-$pkgver.tar.gz::https://github.com/saltstack/libnacl/archive/v$pkgver.tar.gz"
-builddir="$srcdir"/$_pkgname-$pkgver
+depends="libsodium"
+makedepends="
+ libsodium-dev
+ py3-gpep517
+ py3-poetry-core
+ "
+checkdepends="py3-pytest"
+subpackages="$pkgname-pyc"
+source="$pkgname-$pkgver.tar.gz::https://github.com/saltstack/libnacl/archive/refs/tags/v$pkgver.tar.gz"
+builddir="$srcdir"/libnacl-$pkgver
replaces="py-libnacl" # Backwards compatibility
provides="py-libnacl=$pkgver-r$pkgrel" # Backwards compatibility
build() {
- python3 setup.py build
+ gpep517 build-wheel \
+ --wheel-dir .dist \
+ --output-fd 3 3>&1 >&2
}
check() {
- python3 -m unittest discover --start-directory tests -v
+ python3 -m venv --clear --without-pip --system-site-packages .testenv
+ .testenv/bin/python3 -m installer .dist/*.whl
+ .testenv/bin/python3 -m pytest -v
}
package() {
- python3 setup.py install --prefix=/usr --root="$pkgdir"
+ python3 -m installer -d "$pkgdir" \
+ .dist/*.whl
}
-sha512sums="90fd9302cdfbe84acfc7dff0ac95eeb05fd1bb346cd8b220613174d5d1ae5f627be06b4d588fd4a939c49a119ca557d68a06d3cbe1c0d409a253fdca96d944ac libnacl-1.6.1.tar.gz"
+sha512sums="
+717aec5fcc9ffbb7fef5f265861f86a087cc1ad1a122d752b1d8447bf495b98106056f19ff2ad1001ca81b84085ae6167ec96db2c2f3823f0f9a72a2a54788df py3-libnacl-2.1.0.tar.gz
+"