Thanks to visit codestin.com
Credit goes to github.com

Skip to content

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

Closed
adang1345 wants to merge 1 commit into
pypa:mainfrom
adang1345:fix-python313-abs
Closed

Fix issue with absolute path with Python 3.13 on Windows#4671
adang1345 wants to merge 1 commit into
pypa:mainfrom
adang1345:fix-python313-abs

Conversation

@adang1345

Copy link
Copy Markdown
Contributor

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
Copy Markdown
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
Copy Markdown
Contributor Author

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

@adang1345 adang1345 closed this by deleting the head repository Nov 4, 2024
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