Skip to content

Commit dbdea62

Browse files
jklothvstinner
authored andcommitted
bpo-30273: update distutils.sysconfig for venv's created from Python (#1515)
compiled out-of-tree (builddir != srcdir). (see also bpo-15366)
1 parent 74683fc commit dbdea62

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

Lib/distutils/sysconfig.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -93,14 +93,11 @@ def get_python_inc(plat_specific=0, prefix=None):
9393
# the build directory may not be the source directory, we
9494
# must use "srcdir" from the makefile to find the "Include"
9595
# directory.
96-
base = _sys_home or project_base
9796
if plat_specific:
98-
return base
99-
if _sys_home:
100-
incdir = os.path.join(_sys_home, 'Include')
97+
return _sys_home or project_base
10198
else:
10299
incdir = os.path.join(get_config_var('srcdir'), 'Include')
103-
return os.path.normpath(incdir)
100+
return os.path.normpath(incdir)
104101
python_dir = 'python' + get_python_version() + build_flags
105102
return os.path.join(prefix, "include", python_dir)
106103
elif os.name == "nt":

0 commit comments

Comments
 (0)