Kaydet (Commit) f2e894cf authored tarafından Victor Stinner's avatar Victor Stinner Kaydeden (comit) GitHub

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).
üst a5bb6243
...@@ -112,6 +112,11 @@ if os.name == "nt" and "pcbuild" in _PROJECT_BASE[-8:].lower(): ...@@ -112,6 +112,11 @@ if os.name == "nt" and "pcbuild" in _PROJECT_BASE[-8:].lower():
# PC/VS7.1 # PC/VS7.1
if os.name == "nt" and "\\pc\\v" in _PROJECT_BASE[-10:].lower(): if os.name == "nt" and "\\pc\\v" in _PROJECT_BASE[-10:].lower():
_PROJECT_BASE = _safe_realpath(os.path.join(_PROJECT_BASE, pardir, pardir)) _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 # PC/AMD64
if os.name == "nt" and "\\pcbuild\\amd64" in _PROJECT_BASE[-14:].lower(): if os.name == "nt" and "\\pcbuild\\amd64" in _PROJECT_BASE[-14:].lower():
_PROJECT_BASE = _safe_realpath(os.path.join(_PROJECT_BASE, pardir, pardir)) _PROJECT_BASE = _safe_realpath(os.path.join(_PROJECT_BASE, pardir, pardir))
......
...@@ -267,6 +267,8 @@ class ProgramsTestCase(BaseTestCase): ...@@ -267,6 +267,8 @@ class ProgramsTestCase(BaseTestCase):
self.skipTest("Tools/buildbot/test.bat requires PCbuild build, " self.skipTest("Tools/buildbot/test.bat requires PCbuild build, "
"found %s" % build_dir) "found %s" % build_dir)
@unittest.skipUnless(sysconfig.is_python_build(),
'test.bat script is not installed')
@unittest.skipUnless(sys.platform == 'win32', 'Windows only') @unittest.skipUnless(sys.platform == 'win32', 'Windows only')
def test_tools_buildbot_test(self): def test_tools_buildbot_test(self):
self.need_pcbuild() self.need_pcbuild()
......
...@@ -42,6 +42,9 @@ Extension Modules ...@@ -42,6 +42,9 @@ Extension Modules
Library Library
------- -------
- bpo-30342: Fix sysconfig.is_python_build() if Python is built with Visual
Studio 2008 (VS 9.0).
- bpo-29990: Fix range checking in GB18030 decoder. Original patch by Ma Lin. - bpo-29990: Fix range checking in GB18030 decoder. Original patch by Ma Lin.
- bpo-30243: Removed the __init__ methods of _json's scanner and encoder. - bpo-30243: Removed the __init__ methods of _json's scanner and encoder.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment