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

Fix issue with absolute path with Python 3.13 on Windows #4671

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

adang1345
Copy link

Fix #4669

Summary of changes

Fix an issue with Python 3.13 on Windows where specifying the absolute path to an extension module source file would cause the build files to be written to the directory containing the source file.

Closes #4669

Pull Request Checklist

I tested this change manually by using the setup.py and simpleext.c files in the bug report and executing py -3.13 setup.py build_ext. Before this change, the build files were written to the directory containing these files. After this change, the build files were instead written to build/temp.win-amd64-cpython-313. I am not sure whether there is an easy way to add an automated test for this.

@abravalheri
Copy link
Contributor

Hi @adang1345 thank you very much for working on this.

The problem is likely related to a change in Python 3.13: https://docs.python.org/3.13/whatsnew/3.13.html#os-path.

Could you please contribute the change directly to https://github.com/pypa/distutils?

Everything under the setuptools/_distutils folder is merged directly from https://github.com/pypa/distutils and we cannot change it directly in setuptools (otherwise it would be overwritten next time we bring updates from pypa/distutils).

@adang1345
Copy link
Author

I opened a pull request at pypa/distutils#302.

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] Extension module build files are written to source directory
2 participants