mirror of
https://github.com/python/cpython.git
synced 2025-11-14 07:49:28 +00:00
bpo-30273: update distutils.sysconfig for venv's created from Python (#1515)
compiled out-of-tree (builddir != srcdir). (see also bpo-15366)
This commit is contained in:
parent
74683fc624
commit
dbdea629e2
1 changed files with 2 additions and 5 deletions
|
|
@ -93,14 +93,11 @@ def get_python_inc(plat_specific=0, prefix=None):
|
||||||
# the build directory may not be the source directory, we
|
# the build directory may not be the source directory, we
|
||||||
# must use "srcdir" from the makefile to find the "Include"
|
# must use "srcdir" from the makefile to find the "Include"
|
||||||
# directory.
|
# directory.
|
||||||
base = _sys_home or project_base
|
|
||||||
if plat_specific:
|
if plat_specific:
|
||||||
return base
|
return _sys_home or project_base
|
||||||
if _sys_home:
|
|
||||||
incdir = os.path.join(_sys_home, 'Include')
|
|
||||||
else:
|
else:
|
||||||
incdir = os.path.join(get_config_var('srcdir'), 'Include')
|
incdir = os.path.join(get_config_var('srcdir'), 'Include')
|
||||||
return os.path.normpath(incdir)
|
return os.path.normpath(incdir)
|
||||||
python_dir = 'python' + get_python_version() + build_flags
|
python_dir = 'python' + get_python_version() + build_flags
|
||||||
return os.path.join(prefix, "include", python_dir)
|
return os.path.join(prefix, "include", python_dir)
|
||||||
elif os.name == "nt":
|
elif os.name == "nt":
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue