Skip to content

Conversation

@mwilliamson
Copy link

This updates build_ext.get_libraries to handle free-threaded builds of Python when using non-MSVC compilers.

Previously, the non-free-threaded library would be used for free-threaded builds of Python. For instance, when attempting to build an extension for python314t, the extension would be linked against python314.

This fixes pypa/setuptools#5126.

I've manually tested this by using a similarly patched setuptools to successfully build jq.py wheels using mingw32 on Windows for python314t. While there are some automated tests for build_ext, my impression from a quick look was that those tests rely on being run in the relevant environment, rather than (for instance) mocking the environment, and therefore updating the tests to check this case isn't straightforward.

This updates build_ext.get_libraries to handle free-threaded builds
of Python when using non-MSVC compilers.
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.

[BUG] Fail to compile extensions on Windows free-threading non-MSVC

1 participant