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

link against pythonXY_d.dll for debug Python on Windows #2937

Merged
merged 1 commit into from
Feb 7, 2023

Conversation

davidhewitt
Copy link
Member

Closes #2780

Note that upstream Python issue python/cpython#101614 means linking against python3_d.dll is useless, so I've set this to always use the version-specific builds for now.

The heuristic for detecting a Windows debug build is... not great. I check if the EXT_SUFFIX starts with _d., which is the only thing that I could see in the sysconfig which suggested a debug build. If this proves to be brittle, we may wish to ask upstream for something better to be added to sysconfig.

@davidhewitt
Copy link
Member Author

cc @messense when testing this, I found that maturin produced abi3 builds using .pyd suffix, even if ext_suffix in PYO3_CONFIG_FILE was set to something else. It looks like these debug builds only import abi as _d.pyd or version-specific as e.g. _d.cp312-win_amd64.pyd. Might need to adjust maturin a little?

@davidhewitt
Copy link
Member Author

bors r+

@davidhewitt davidhewitt mentioned this pull request Feb 7, 2023
@bors
Copy link
Contributor

bors bot commented Feb 7, 2023

Build succeeded:

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.

Not able to link with pyo3 in debug mode on Windows
1 participant