From 4fc9d84b544c2bf80265b037d9b7a0f88859cca5 Mon Sep 17 00:00:00 2001 From: Steve Dower Date: Tue, 23 May 2017 10:00:49 -0700 Subject: [PATCH 1/6] Improves test_underpth_nosite_file to reveal why it fails. --- Lib/test/test_site.py | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/Lib/test/test_site.py b/Lib/test/test_site.py index 0924f01ba1adbf..150162279e6df6 100644 --- a/Lib/test/test_site.py +++ b/Lib/test/test_site.py @@ -547,12 +547,16 @@ def test_underpth_nosite_file(self): env = os.environ.copy() env['PYTHONPATH'] = 'from-env' env['PATH'] = '{};{}'.format(exe_prefix, os.getenv('PATH')) - rc = subprocess.call([exe_file, '-c', - 'import sys; sys.exit(sys.flags.no_site and ' - 'len(sys.path) > 200 and ' - 'sys.path == %r)' % sys_path, - ], env=env) - self.assertTrue(rc, "sys.path is incorrect") + output = subprocess.check_output([exe_file, '-c', + 'import sys; print("\\n".join(sys.path) if sys.flags.no_site else "")' + ], env=env, encoding='ansi') + actual_sys_path = output.rstrip().split('\n') + self.assert_(actual_sys_path, "sys.flags.no_site was False") + self.assertEqual( + actual_sys_path, + sys_path, + "sys.path is incorrect" + ) def test_underpth_file(self): libpath = os.path.dirname(os.path.dirname(encodings.__file__)) From 9749c485193cc7fd90483a38c07746f84cd6c3d7 Mon Sep 17 00:00:00 2001 From: Steve Dower Date: Tue, 23 May 2017 11:45:20 -0700 Subject: [PATCH 2/6] Enable building with Windows 10 SDK. --- PCbuild/python.props | 2 ++ 1 file changed, 2 insertions(+) diff --git a/PCbuild/python.props b/PCbuild/python.props index d6bfd0877e09df..00b75817e271a9 100644 --- a/PCbuild/python.props +++ b/PCbuild/python.props @@ -15,6 +15,8 @@ v110 v100 + $(WindowsSDKVersion) + $(BasePlatformToolset) false true From 8432e02faba45d2e7aad7daf0141975f3196a1e6 Mon Sep 17 00:00:00 2001 From: Steve Dower Date: Tue, 23 May 2017 14:08:17 -0700 Subject: [PATCH 3/6] Fix WinSDK detection --- PCbuild/python.props | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/PCbuild/python.props b/PCbuild/python.props index 00b75817e271a9..563487e0c366ff 100644 --- a/PCbuild/python.props +++ b/PCbuild/python.props @@ -15,8 +15,6 @@ v110 v100 - $(WindowsSDKVersion) - $(BasePlatformToolset) false true @@ -65,6 +63,21 @@ $(BuildPath)python$(PyDebugExt).exe + + + 10.0.15063.0 + 10.0.15063.0 + 10.0.10586.0 + 10.0.10586.0 + 10.0.10240.0 + 10.0.10240.0 + +