void-packages/srcpkgs/python3-cryptography/template

37 lines
1.2 KiB
Bash

# Template file for 'python3-cryptography'
pkgname=python3-cryptography
version=3.4.7
revision=1
wrksrc="${pkgname#python3-}-${version}"
build_style=python3-module
build_helper="rust"
hostmakedepends="python3-setuptools-rust python3-cffi cargo"
makedepends="python3-devel openssl-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=3d10de8116d25649631977cb37da6cbdd2d6fa0e0281d014a5b7d337255ca713
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
}