diff options
author | Victor Stinner <victor.stinner@gmail.com> | 2017-05-17 00:58:02 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-05-17 00:58:02 (GMT) |
commit | 460945f22acd288e660b432b288d9d81655572bf (patch) | |
tree | 4949029e3a8262a11302a078b588567c11ae54bb | |
parent | 6b5b85aecf4db796a05582202a6c875b36eae516 (diff) | |
download | cpython-460945f22acd288e660b432b288d9d81655572bf.zip cpython-460945f22acd288e660b432b288d9d81655572bf.tar.gz cpython-460945f22acd288e660b432b288d9d81655572bf.tar.bz2 |
bpo-30273: update distutils.sysconfig for venv's created from Python (#1515) (#1625)
compiled out-of-tree (builddir != srcdir). (see also bpo-15366)
(cherry picked from commit dbdea629e2e0e4bd8845aa55041e0a0ca4172cf3)
-rw-r--r-- | Lib/distutils/sysconfig.py | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/Lib/distutils/sysconfig.py b/Lib/distutils/sysconfig.py index 90004ac..2bcd1dd 100644 --- a/Lib/distutils/sysconfig.py +++ b/Lib/distutils/sysconfig.py @@ -93,14 +93,11 @@ def get_python_inc(plat_specific=0, prefix=None): # the build directory may not be the source directory, we # must use "srcdir" from the makefile to find the "Include" # directory. - base = _sys_home or project_base if plat_specific: - return base - if _sys_home: - incdir = os.path.join(_sys_home, 'Include') + return _sys_home or project_base else: 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 return os.path.join(prefix, "include", python_dir) elif os.name == "nt": |