aboutsummaryrefslogtreecommitdiffstats
path: root/main/py3-cryptography/APKBUILD
blob: 4d6882b6196f4d4bb9c972684dad0d48ce977002 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
# Contributor: August Klein <amatcoder@gmail.com>
# Maintainer: August Klein <amatcoder@gmail.com>
pkgname=py3-cryptography
_pyname=cryptography
pkgver=3.3
pkgrel=0
pkgdesc="Cryptographic recipes and primitives for Python"
url="https://cryptography.io/"
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"
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

# secfixes:
#   3.2.1-r0:
#     - CVE-2020-25659

build() {
	python3 setup.py build

	# prepare cryptography vectors for testing
	cd "$srcdir/cryptography_vectors-$pkgver"
	python3 setup.py build
}

check() {
	PYTHONPATH="$(echo $PWD/build/lib.linux-*):$srcdir/cryptography_vectors-$pkgver/build/lib" pytest
}

package() {
	python3 setup.py install --prefix=/usr --root="$pkgdir" --skip-build
}

sha512sums="ebb792ed2b762d5c3d31209fafac257f6afa526381a01d4a2c08b175acadf44eea7519e0fa11be83f6dbe85a68b1694e32aa670cc41b94afe5d4e9b33e9fdc07  cryptography-3.3.tar.gz
b177567de3fbd745ea9ca475bbd67c40b757322180ba217039d8d5c29c7a17e779e5bd787a7e8e27257f6825a428e3ed768303ccb02f3cfb081716422b02cfcd  cryptography_vectors-3.3.tar.gz"