Difference among distutils.sysconfig.get_python_inc()
wqh17101 opened this issue · comments
The issue is related to pypa/setuptools#3605
I found that
in func get_python_inc
default_prefix:/opt/aaa/python/python-3.9.2
resolved_prefix:/opt/aa/python/python-3.9.2
_get_python_inc_posix_python : None
_get_python_inc_from_config: /devcloud/ws/sirFh/workspace/j_VWBQ8FGA/aaa_python/third_build/python/include/python3.9
_get_python_inc_posix_prefix: /opt/aaa/python/python-3.9.2/include/python3.9
I found that the path in _get_python_inc_from_config is geneated by prefix which is a option of building python.
But the python can install to anywhere,maybe not the same as prefix.So this will cause this error.
Maybe we can adjust the order of
distutils/distutils/sysconfig.py
Lines 136 to 140 in 22b9bcf
like
return (
_get_python_inc_posix_python(plat_specific)
or _get_python_inc_posix_prefix(prefix
or _get_python_inc_from_config(plat_specific, spec_prefix)
)
)
I believe this issue is a duplicate of #178.