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: support sysconfig direclty in 3.10+ #3678

Closed
wants to merge 1 commit into from

Conversation

henryiii
Copy link
Collaborator

@henryiii henryiii commented Feb 2, 2022

Description

Closes #3677.

Suggested changelog entry:

* Use sysconfig over distutils for Python 3.10 using classic CMake discovery.

Copy link
Collaborator

@rwgk rwgk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems to be very similar to a recent change in tools/pybind11NewTools.cmake. Evidently, someone works on one copy, unaware of the other, and it takes two iterations. I usually flag such situations with a comment, e.g.

# Note that there is similar code in X.

@henryiii
Copy link
Collaborator Author

henryiii commented Feb 2, 2022

This is a lot more complicated because we'll have to work out how to get each value, and have some sort of nicer toggle to keep the code from exploding. (notice it doesn't work on Python 3.10 with the current change) The pybind11NewTools.cmake change is only partially related.

@henryiii
Copy link
Collaborator Author

henryiii commented Feb 2, 2022

(pytorch/pytorch@4b96fc0 will likely be very helpful)

Given that nothing is broken, I think we are fine to continue with a release without doing this.

@stefanor
Copy link
Contributor

Filed PR #3764, which adds a sysconfig path for >= 3.10, and uses the distutils mechanism for older pythons.

@henryiii henryiii closed this Apr 15, 2022
@henryiii henryiii deleted the henryiii/fix/sysconf310 branch April 15, 2022 03:38
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]: Distutils is going to be deprecated with Python3.12
3 participants