python-cryptography: update to 3.3.2, split package

New package: python3-cryptography-3.4.4
This commit is contained in:
Andrew J. Hesford 2021-02-08 10:58:28 -05:00
parent 64faf773cb
commit 76988cd6c9
4 changed files with 46 additions and 23 deletions

View File

@ -1,42 +1,28 @@
# Template file for 'python-cryptography'
pkgname=python-cryptography
version=3.3.1
version=3.3.2
revision=1
wrksrc="cryptography-${version}"
build_style=python-module
hostmakedepends="python-setuptools python3-setuptools libressl-devel
python-enum34 python-ipaddress python-six python3-six
python-cffi python3-cffi python-idna python3-idna"
makedepends="libressl-devel python-devel python3-devel"
build_style=python2-module
hostmakedepends="python-setuptools libressl-devel python-enum34
python-ipaddress python-six python-cffi python-idna"
makedepends="libressl-devel python-devel"
depends="python-cffi python-six python-enum34 python-idna python-ipaddress"
checkdepends="python-cryptography_vectors python-hypothesis python-pretend
python-pytest python-pytz python-iso8601 python3-cryptography_vectors
python3-hypothesis python3-pretend python3-pytest python3-pytz python3-iso8601
${depends}"
python-pytest python-pytz python-iso8601 ${depends}"
short_desc="Python2 library that provides cryptographic recipes and primitives"
maintainer="Alessio Sergi <al3hex@gmail.com>"
license="BSD-3-Clause, Apache-2.0"
homepage="https://github.com/pyca/cryptography"
changelog="https://raw.githubusercontent.com/pyca/cryptography/master/CHANGELOG.rst"
distfiles="${PYPI_SITE}/c/cryptography/cryptography-${version}.tar.gz"
checksum=7e177e4bea2de937a584b13645cab32f25e3d96fc0bc4a4cf99c27dc77682be6
checksum=5a60d3780149e13b7a6ff7ad6526b38846354d11a15e21068e57073e29e19bed
do_check() {
PYTHONPATH="$(cd build-2.7/lib* && pwd)" python2.7 -m pytest tests
PYTHONPATH="$(cd build-${py3_ver}/lib* && pwd)" python${py3_ver} -m pytest tests
PYTHONPATH="$(cd build/lib* && pwd)" python2.7 -m pytest tests
}
post_install() {
vlicense LICENSE
vlicense LICENSE.BSD
}
python3-cryptography_package() {
depends="python3-cffi python3-six python3-idna"
short_desc="${short_desc/Python2/Python3}"
pkg_install() {
vmove usr/lib/python3*
vlicense LICENSE
vlicense LICENSE.BSD
}
}

View File

@ -0,0 +1,2 @@
# cryptography >= 3.4 does not support Python 2
pattern="cryptography-\K3\.3\.[0-9.]+(?=.tar.gz)"

View File

@ -1 +0,0 @@
python-cryptography

View File

@ -0,0 +1,36 @@
# Template file for 'python3-cryptography'
pkgname=python3-cryptography
version=3.4.4
revision=1
wrksrc="${pkgname#python3-}-${version}"
build_style=python3-module
build_helper="rust"
hostmakedepends="python3-setuptools-rust python3-cffi cargo"
makedepends="python3-devel libressl-devel"
depends="python3-cffi"
checkdepends="python3-pytest-subtests python3-pytz python3-iso8601
python3-cryptography_vectors python3-pretend python3-hypothesis $depends"
short_desc="Python3 library that provides cryptographic recipes and primitives"
maintainer="Andrew J. Hesford <ajh@sideband.org>"
license="BSD-3-Clause, Apache-2.0"
homepage="https://github.com/pyca/cryptography"
changelog="https://raw.githubusercontent.com/pyca/cryptography/master/CHANGELOG.rst"
distfiles="${PYPI_SITE}/c/cryptography/cryptography-${version}.tar.gz"
checksum=ee5e19f0856b6fbbdbab15c2787ca65d203801d2d65d0b8de6218f424206c848
if [ "$CROSS_BUILD" ]; then
makedepends+=" rust-std"
export PYO3_CROSS_LIB_DIR="${XBPS_CROSS_BASE}/usr/lib"
export PYO3_CROSS_INCLUDE_DIR="${XBPS_CROSS_BASE}/usr/include"
fi
do_check() {
PYTHONPATH="$(cd build/lib* && pwd)" python3 -m pytest
}
post_install() {
vlicense LICENSE
vlicense LICENSE.BSD
chmod 755 ${DESTDIR}/${py3_sitelib}/cryptography/hazmat/bindings/*.so
}