aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichał Polański <michal@polanski.me>2020-11-12 21:33:31 +0100
committerLeo <thinkabit.ukim@gmail.com>2020-11-13 21:18:59 +0000
commitb67710cde7529d7b36ac6e6e2eaa080112174a17 (patch)
tree2a299be6f3656cee2081ded565d0be898514d14e
parent9c0acaacd12032444c9d39ceba481c3f30d8863d (diff)
downloadaports-b67710cde7529d7b36ac6e6e2eaa080112174a17.tar.gz
aports-b67710cde7529d7b36ac6e6e2eaa080112174a17.tar.bz2
aports-b67710cde7529d7b36ac6e6e2eaa080112174a17.tar.xz
main/py3-cryptography: fix tests
Previous check function wasn't running any tests
-rw-r--r--main/py3-cryptography/APKBUILD19
1 files changed, 13 insertions, 6 deletions
diff --git a/main/py3-cryptography/APKBUILD b/main/py3-cryptography/APKBUILD
index e6da9a20a9..4e85da846e 100644
--- a/main/py3-cryptography/APKBUILD
+++ b/main/py3-cryptography/APKBUILD
@@ -1,7 +1,7 @@
# Contributor: August Klein <amatcoder@gmail.com>
# Maintainer: August Klein <amatcoder@gmail.com>
pkgname=py3-cryptography
-_pkgname=cryptography
+_pyname=cryptography
pkgver=3.2.1
pkgrel=0
pkgdesc="Cryptographic recipes and primitives for Python"
@@ -10,8 +10,10 @@ arch="all"
license="Apache-2.0 OR BSD-3-Clause"
depends="python3 py3-cffi py3-idna py3-asn1crypto py3-six"
makedepends="python3-dev py3-setuptools libffi-dev openssl-dev"
-source="https://files.pythonhosted.org/packages/source/${_pkgname:0:1}/$_pkgname/$_pkgname-$pkgver.tar.gz"
-builddir="$srcdir/$_pkgname-$pkgver"
+checkdepends="py3-pytest py3-hypothesis py3-tz py3-pretend py3-iso8601"
+source="https://files.pythonhosted.org/packages/source/c/cryptography/cryptography-$pkgver.tar.gz
+ https://files.pythonhosted.org/packages/source/c/cryptography_vectors/cryptography_vectors-$pkgver.tar.gz"
+builddir="$srcdir/$_pyname-$pkgver"
replaces="py-cryptography" # Backwards compatibility
provides="py-cryptography=$pkgver-r$pkgrel" # Backwards compatibility
@@ -22,14 +24,19 @@ provides="py-cryptography=$pkgver-r$pkgrel" # Backwards compatibility
build() {
python3 setup.py build
+
+ # prepare cryptography vectors for testing
+ cd "$srcdir/cryptography_vectors-$pkgver"
+ python3 setup.py build
}
check() {
- python3 setup.py check
+ PYTHONPATH="$(echo $PWD/build/lib.linux-*):$srcdir/cryptography_vectors-$pkgver/build/lib" pytest
}
package() {
- python3 setup.py install --prefix=/usr --root="$pkgdir"
+ python3 setup.py install --prefix=/usr --root="$pkgdir" --skip-build
}
-sha512sums="e3f1806693c24aadc3ef0df374ce1845760e87ad7c243226b75e80820b50bdc0760e4bb5f6ce26d62a6d23736b3109f72cd30b52ae2a36b26ec5656ec96c6175 cryptography-3.2.1.tar.gz"
+sha512sums="e3f1806693c24aadc3ef0df374ce1845760e87ad7c243226b75e80820b50bdc0760e4bb5f6ce26d62a6d23736b3109f72cd30b52ae2a36b26ec5656ec96c6175 cryptography-3.2.1.tar.gz
+44ff756a6ece9700f7657f8ba92417e95bf273cf500f1dab2141de5b2af6e61840d65c37b766abd752c76025ead1550bfc7b7340ce5774c75fd0bb8ac768cdd8 cryptography_vectors-3.2.1.tar.gz"