diff options
author | Victor Stinner <victor.stinner@gmail.com> | 2017-05-12 09:31:08 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-05-12 09:31:08 (GMT) |
commit | f2e894cfd9b6f5d6aacc276476262d481203030c (patch) | |
tree | 5e111eeb812af5282d187cc24087e3cc03747b93 /Lib/sysconfig.py | |
parent | a5bb62436e25614276ac4b8e252a87f3fcc946cd (diff) | |
download | cpython-f2e894cfd9b6f5d6aacc276476262d481203030c.zip cpython-f2e894cfd9b6f5d6aacc276476262d481203030c.tar.gz cpython-f2e894cfd9b6f5d6aacc276476262d481203030c.tar.bz2 |
bpo-30342: Fix sysconfig.is_python_build() on VS9.0 (#1544)
Fix sysconfig.is_python_build() if Python is built with Visual Studio
2008 (VS 9.0).
Diffstat (limited to 'Lib/sysconfig.py')
-rw-r--r-- | Lib/sysconfig.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Lib/sysconfig.py b/Lib/sysconfig.py index 2a1da5a..9c8350d 100644 --- a/Lib/sysconfig.py +++ b/Lib/sysconfig.py @@ -112,6 +112,11 @@ if os.name == "nt" and "pcbuild" in _PROJECT_BASE[-8:].lower(): # PC/VS7.1 if os.name == "nt" and "\\pc\\v" in _PROJECT_BASE[-10:].lower(): _PROJECT_BASE = _safe_realpath(os.path.join(_PROJECT_BASE, pardir, pardir)) +# PC/VS9.0/amd64 +if (os.name == "nt" + and os.path.basename(os.path.dirname(os.path.dirname(_PROJECT_BASE))).lower() == "pc" + and os.path.basename(os.path.dirname(_PROJECT_BASE)).lower() == "vs9.0"): + _PROJECT_BASE = _safe_realpath(os.path.join(_PROJECT_BASE, pardir, pardir, pardir)) # PC/AMD64 if os.name == "nt" and "\\pcbuild\\amd64" in _PROJECT_BASE[-14:].lower(): _PROJECT_BASE = _safe_realpath(os.path.join(_PROJECT_BASE, pardir, pardir)) |