python3-cryptography: rebuild for Python 3.10, disable rust

The rust extension is a no-op and currently fails to cross build with
Python 3.10. For now, skip building the extension and hope upstream
makes this easy to fix by the time the rust extension becomes mandatory.
This commit is contained in:
Andrew J. Hesford 2021-09-24 23:16:49 -04:00
parent a2a3baced5
commit 7798801080

View file

@ -1,11 +1,10 @@
# Template file for 'python3-cryptography' # Template file for 'python3-cryptography'
pkgname=python3-cryptography pkgname=python3-cryptography
version=3.4.8 version=3.4.8
revision=1 revision=2
wrksrc="${pkgname#python3-}-${version}" wrksrc="${pkgname#python3-}-${version}"
build_style=python3-module build_style=python3-module
build_helper="rust" hostmakedepends="python3-setuptools-rust python3-cffi"
hostmakedepends="python3-setuptools-rust python3-cffi cargo"
makedepends="python3-devel openssl-devel" makedepends="python3-devel openssl-devel"
depends="python3-cffi" depends="python3-cffi"
checkdepends="python3-pytest-subtests python3-pytz python3-iso8601 checkdepends="python3-pytest-subtests python3-pytz python3-iso8601
@ -18,11 +17,14 @@ changelog="https://raw.githubusercontent.com/pyca/cryptography/master/CHANGELOG.
distfiles="${PYPI_SITE}/c/cryptography/cryptography-${version}.tar.gz" distfiles="${PYPI_SITE}/c/cryptography/cryptography-${version}.tar.gz"
checksum=94cc5ed4ceaefcbe5bf38c8fba6a21fc1d365bb8fb826ea1688e3370b2e24a1c checksum=94cc5ed4ceaefcbe5bf38c8fba6a21fc1d365bb8fb826ea1688e3370b2e24a1c
if [ "$CROSS_BUILD" ]; then # The rust extension is a no-op designed to test build systems and,
makedepends+=" rust-std" # for the moment, does not work properly with Python 3.10 on cross.
export PYO3_CROSS_LIB_DIR="${XBPS_CROSS_BASE}/usr/lib" # Hoepfully upstream tooling will make accommodating Python 3.10 trivial by the
export PYO3_CROSS_INCLUDE_DIR="${XBPS_CROSS_BASE}/usr/include" # time the rust extension actually does something.
fi #
# See, e.g., commit 58bc3876d33bfa5e37a21b5a4b27f016af387a76 to see how the
# rust extension was built with Python 3.9.
export CRYPTOGRAPHY_DONT_BUILD_RUST=1
post_install() { post_install() {
vlicense LICENSE vlicense LICENSE