-
-
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] Difference among distutils.sysconfig.get_python_inc() #3605
Comments
Hi @wqh17101, could you try running this with https://github.com/pypa/distutils instead of the The Regarding the reproducer, if we need to investigate the issue deeper we will need a bit more information than linux/docker. Is there any chance you can share a minimal Dockerfile that reproduces the error? You can find some tips on how to right helpful reproducers in this post from stackoverflow. |
So that you mean this is the bug of https://github.com/pypa/distutils ?@abravalheri |
I don't think we can be categorical without a proper reproducer. Could you have a look on the 2 items I proposed in the previous comment?
Have you tried this one? What is the outcome?
Could you please share with us a reproducer? |
How to install this one? As you say, Sorry,Hard to make a reproducer for me. |
If you clone https://github.com/pypa/distutils and run the experiment from within the folder, that should do the trick.
This makes it really difficult to investigate/help. |
get the same result as setuptools,
Maybe you can test in any docker env? |
I cannot observe the described behaviour in the following experiment: > docker run --rm -it python:3.9.2 /bin/bash
python -c 'import distutils.sysconfig; print(distutils.sysconfig.get_python_inc())'
# /usr/local/include/python3.9
python -m pip install -U pip setuptools
# ...
# Successfully installed pip-22.2.2 setuptools-65.3.0
python -c 'import distutils.sysconfig; print(distutils.sysconfig.get_python_inc())'
# /usr/local/include/python3.9
python -c 'import setuptools; import distutils.sysconfig; print(distutils.sysconfig.get_python_inc())'
# /usr/local/include/python3.9 We will probably need a minimal reproducer to proceed with the investigation. |
@abravalheri I found the reason. pypa/distutils#179 |
I opened a similar issue in the distutils repository. I have a reproducible case with ChimeraX. |
If you prefer not to install ChimeraX, you can pull our docker container
As you can see, the header locations change from the bundled Python's location to wherever they were when that Python was built. |
setuptools version
65.3.0
Python version
3.9.2
OS
Linux
Additional environment information
My env is in a docker.
Description
Hi there, i find that setuptools 65.3.0 hack the distutils. I want to get the include dir of python
And i found that
before install setuptools
and get
/opt/aaa/python/python-3.9.2/include/python3.9
after install that
and get
/devcloud/ws/sirFh/workspace/j_VWBQ8FGA/aaa_python/third_build/python/include/python3.9
/opt/aaa/python/python-3.9.2/include/python3.9
is the right anwser.And
/devcloud/ws/sirFh/workspace/j_VWBQ8FGA/aaa_python/third_build/python/include/python3.9
does not exist in my docker or even my machineExpected behavior
Get the right include dir
How to Reproduce
import distutils.sysconfig; print(distutils.sysconfig.get_python_inc())
Output
python -c 'import distutils.sysconfig; print(distutils.sysconfig.get_python_inc())'
The text was updated successfully, but these errors were encountered: