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

Support building with Mingw Python #1423

Merged
merged 1 commit into from Feb 12, 2021
Merged

Conversation

lazka
Copy link
Contributor

@lazka lazka commented Feb 12, 2021

The DLL of the mingw Python in MSYS2 is named libpython3.8.dll:

$ python3 -m sysconfig | grep LIBPYTHON
LIBPYTHON = "-lpython3.8"

Add another special case to in get_rustc_link_lib() to handle that case.
Afaik the mingw build doesn't support the limited ABI, so skip that as well.

This makes all tests pass in an MSYS2 environment and lets us build
python-cryptography.

@lazka
Copy link
Contributor Author

lazka commented Feb 12, 2021

I know mingw Python isn't officially supported, but I thought this change is small enough to be considered anyway.

The DLL of the mingw Python in MSYS2 is named libpython3.8.dll:

$ python3 -m sysconfig | grep LIBPYTHON
        LIBPYTHON = "-lpython3.8"

Add another special case to in get_rustc_link_lib() to handle that case.
Afaik the mingw build doesn't support the limited ABI, so skipt that as well.

This makes all tests pass in an MSYS2 environment and lets us build
python-cryptography.
@davidhewitt
Copy link
Member

Thanks for the PR! I'm willing to merge this. Before we do, I wanted to ask whether we also need to consider adding a similar special case for PyPy?

@lazka
Copy link
Contributor Author

lazka commented Feb 12, 2021

Thanks. PyPy doesn't support mingw, so for that case nothing is needed. As for PyPy on Windows in general, I'd need to check.

@davidhewitt
Copy link
Member

Ah great. We already support PyPy on Windows so it sounds like there's no further changes needed here.

Would you mind rebasing on master? That should fix the CI issues.

(If you're willing to add a note to the ## Fixed section of the CHANGELOG documenting this at the same time, that'd be great.)

@davidhewitt
Copy link
Member

Actually nvm, I'll do this now as I'm preparing the next patch release atm. Sorry if you already started!

@lazka
Copy link
Contributor Author

lazka commented Feb 13, 2021

Thanks!

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.

None yet

2 participants