aboutsummaryrefslogtreecommitdiffstats
path: root/community/py3-cryptography/APKBUILD
blob: bbce76cd9e85d2c54b423d33abd50d6ba3fd63b5 (plain)
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
43
44
45
46
47
48
49
50
51
52
# Contributor: August Klein <amatcoder@gmail.com>
# Maintainer: August Klein <amatcoder@gmail.com>

# RESTRICTED: Any upgrade to this package must be tested against ALL architectures
# supported by Alpine. It is not allowed to mask this package on ANY architecture.
# At present, upgrade is not allowed because rustc is not yet available on ALL
# supported architectures. Any upgrade which masks an architecture WILL be reverted.

pkgname=py3-cryptography
_pyname=cryptography
pkgver=37.0.4
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-six"
makedepends="python3-dev py3-setuptools libffi-dev openssl1.1-compat-dev py3-setuptools-rust"
checkdepends="py3-pytest py3-pytest-subtests py3-hypothesis py3-tz py3-pretend py3-iso8601 py3-pytest-benchmark"
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.2-r0:
#     - CVE-2020-36242
#   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="
9d39a2ec4facffd6d1c1db9267248846071aca8ac3bccba3da2d1a0664c6ce2a38c5245a9b8f62845a83abe6ba2782c43333aa4260960f37dc2eac3789a73575  cryptography-37.0.4.tar.gz
33098be46d072bf35f72320d64fd244a8ef890e99ae7baa21f9fbbb8d423d60f2711c3c1293830c860ff9bdd79bff910ce4df0f4dc9f363d712b722dab2de7ab  cryptography_vectors-37.0.4.tar.gz
"