-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
[BUG] bundled distutils produces incorrect paths to headers with relocatable pythons #3657
Comments
I think we're experiencing the same error, and by bisection based on https://setuptools.pypa.io/en/latest/history.html, it might have been introduced in #3553 (setuptools v65.2.0) # correct
$ /platform/python3/bin/python3 /platform/python3/bin/pip3 install setuptools==65.0.0
<success>
$ /platform/python3/bin/python3 -c "from distutils import sysconfig; print(sysconfig.get_python_inc())"
/platform/python3/include/python3.7m # correct
$ /platform/python3/bin/python3 /platform/python3/bin/pip3 install setuptools==65.1.1
<success>
$ /platform/python3/bin/python3 -c "from distutils import sysconfig; print(sysconfig.get_python_inc())"
/platform/python3/include/python3.7m # INCORRECT (or at least differs in a way that breaks pip compilation of subsequent native modules)
$ /platform/python3/bin/python3 /platform/python3/bin/pip3 install setuptools==65.2.0
<success>
$ /platform/python3/bin/python3 -c "from distutils import sysconfig; print(sysconfig.get_python_inc())"
/root/python-3.7.2/include/python3.7m note: |
We encountered this breaking change too, when upgrading from setuptools 65.1.1 to 65.2.0. It appears to have been caused by: Which is under discussion at: |
I meet the same issue, what is the solution~ 🤣 |
This is fixed for me now (at least with my configuration) in setuptools 67.2.0, thanks to #3809 which pulled in the fix from distutils (pypa/distutils/pull/200). |
indeed, the script above now succeeds |
setuptools version
65.5.0
Python version
3.11.0
OS
macos
Additional environment information
the pythons can be downloaded from here if you'd like to reproduce exactly:
arm64: https://storage.googleapis.com/sentry-dev-infra-assets/prebuilt-pythons/python-3.11.0+0-macosx_12_0_arm64.tgz
x86_64: https://storage.googleapis.com/sentry-dev-infra-assets/prebuilt-pythons/python-3.11.0+0-macosx_12_0_x86_64.tgz
the pythons are built from https://github.com/getsentry/prebuilt-pythons
Description
building a trivial C extension fails as it looks for the headers at the original path that the binaries were built at rather than the path after installation. the stdlib implementation of
distutils
seems to handle this correctlyExpected behavior
I expect them to be able to build and identify the prefix from the current executable location -- for example using
SETUPTOOLS_USE_DISTUTILS=stdlib
:How to Reproduce
note that this script has the url above for
arm64
-- substitute forx86_64
insteadOutput
The text was updated successfully, but these errors were encountered: