Skip to content

Conversation

alex
Copy link
Contributor

@alex alex commented Aug 20, 2025

No description provided.

@alex alex force-pushed the build-extension-env-var branch from bfef190 to 702e5ca Compare August 20, 2025 22:18
@alex
Copy link
Contributor Author

alex commented Aug 20, 2025

I couldn't see a great way to write a test case for this, so my plan is to send PRs to maturin and setuptools-rust to respect this env var, at which point once they're in a release it'll be easy to test.

@alex
Copy link
Contributor Author

alex commented Aug 21, 2025

maturin: PyO3/maturin#2723

@alex
Copy link
Contributor Author

alex commented Aug 21, 2025

setuptools-rust: PyO3/setuptools-rust#540

@messense messense changed the title fixes #5202 -- treat the PYO3_BUILD_EXTENSION_MODULE env var the same as teh extension-module feature fixes #5202 -- treat the PYO3_BUILD_EXTENSION_MODULE env var the same as the extension-module feature Aug 25, 2025
@alex
Copy link
Contributor Author

alex commented Aug 26, 2025

@davidhewitt any chance we can sneak this in to 0.26?

@alex alex mentioned this pull request Aug 26, 2025
@davidhewitt
Copy link
Member

I think we can probably test the basics within this repo by checking the shared objects produced by the pytests module, maybe as part of pytests/noxfile.py? (And explicitly set the env var in that build, maybe)

I will do my best to give this a full review tonight, agreed it would be nice to put this in 0.26 so that maturin / setuptools-rust can add support.

@alex
Copy link
Contributor Author

alex commented Aug 27, 2025

Hmm, so the problem is that until this is in a maturin release (the PR was merged there), setting the env var doesn't do anything :-) Once the maturin release is out I can definitely update the test.

Do we have any existing extension module tests that don't go through either maturin or rust-openssl?

@messense
Copy link
Member

@alex Feel free to raise a PR in maturin to release a new patch version to unblock this. (or I can do it after work today.) Thanks!

@alex
Copy link
Contributor Author

alex commented Aug 27, 2025

Almost bed time here, if you're able to get to it that'd be great, thank you!

@alex alex force-pushed the build-extension-env-var branch from 702e5ca to bfbb4fe Compare August 27, 2025 11:38
@alex
Copy link
Contributor Author

alex commented Aug 27, 2025

I'm very confused:

  ================ 181 passed, 1 skipped, 4094 warnings in 5.74s =================
  nox > Command pytest  failed with exit code -11

@alex
Copy link
Contributor Author

alex commented Aug 27, 2025

Looks like only 3.14 is segfaulting, is this a known issue? I don't see how this PR could possibly cause this (which isn't to say it doesn't...)

@davidhewitt
Copy link
Member

Try merging main, for reasons I haven't quite followed the CI plan is coming from the merge commit even though the fix for 3.14 is not on your branch.

…e same as teh extension-module feature
@alex alex force-pushed the build-extension-env-var branch from bfbb4fe to 66e044a Compare August 27, 2025 12:27
@alex
Copy link
Contributor Author

alex commented Aug 27, 2025

Easy enough! Thanks

@alex
Copy link
Contributor Author

alex commented Aug 27, 2025

Phew, green now -- with test!

Copy link
Member

@davidhewitt davidhewitt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's ship this 👍

@davidhewitt davidhewitt added this pull request to the merge queue Aug 28, 2025
Merged via the queue into PyO3:main with commit ed030a7 Aug 28, 2025
44 checks passed
@alex alex deleted the build-extension-env-var branch August 28, 2025 19:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants