Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

python-cryptography: split python2 package #28595

Closed
wants to merge 4 commits into from

Conversation

ahesford
Copy link
Member

@ahesford ahesford commented Feb 8, 2021

If we wanted to, we could set CRYPTOGRAPHY_DONT_BUILD_RUST for "this release only" (which probably means this minor version only) and delay the python3-setuptools_rust addition. That would also prevent the installation of the no-op cryptography.hazmat.bindings._rust module. However, given that Rust is about to become a hard requirement for this package, we might as well just get it done with now.

The python3-pytest-subtests package is only required for checks in python3-cryptography but, given the importance of cryptography, I think it's worth ensuring that those tests pass.

@ahesford
Copy link
Member Author

ahesford commented Feb 8, 2021

If setuptools_rust upstream rejects the patch to honor RUSTFLAGS in the environment, either we patch anyway or we work around its tendency to overwrite that variable by wrapping cargo for cross builds of python3-cryptography:

pre_configure() {
	if [ "$CROSS_BUILD" ]; then
		cat > ${XBPS_WRAPPERDIR}/cargo <<-EOF
		#!/bin/bash
		if [[ ! "\$RUSTFLAGS" =~ "--sysroot" ]]; then
		    export RUSTFLAGS="\$RUSTFLAGS --sysroot=${XBPS_CROSS_BASE}/usr"
		fi
		exec /usr/bin/cargo "\$@"
		EOF
		chmod 755 ${XBPS_WRAPPERDIR}/cargo
	fi
}

@ericonr
Copy link
Member

ericonr commented Feb 8, 2021

I strongly prefer the patch to setuptools_rust.

@ericonr
Copy link
Member

ericonr commented Feb 9, 2021

We might not have to patch the package, PyO3/setuptools-rust#103 can be included in the next release :)

@ahesford
Copy link
Member Author

Closed in 76988cd

@ahesford ahesford closed this Feb 11, 2021
@ahesford ahesford deleted the cryptography branch February 11, 2021 14:38
@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 12, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants