diff --git a/Lib/distutils/tests/test_bdist.py b/Lib/distutils/tests/test_bdist.py index f762f5d9873099..e56822ce277978 100644 --- a/Lib/distutils/tests/test_bdist.py +++ b/Lib/distutils/tests/test_bdist.py @@ -1,5 +1,6 @@ """Tests for distutils.command.bdist.""" import os +import platform import unittest from test.support import run_unittest @@ -7,6 +8,10 @@ from distutils.tests import support +SKIP_MESSAGE = (None if platform.win32_editionId() != 'IoTUAP' else + "These tests don't work on windows arm32") + +@unittest.skipUnless(SKIP_MESSAGE is None, SKIP_MESSAGE) class BuildTestCase(support.TempdirManager, unittest.TestCase): diff --git a/Lib/distutils/tests/test_bdist_msi.py b/Lib/distutils/tests/test_bdist_msi.py index 15d8bdff2b4f55..abcdbafbb74b9b 100644 --- a/Lib/distutils/tests/test_bdist_msi.py +++ b/Lib/distutils/tests/test_bdist_msi.py @@ -1,11 +1,15 @@ """Tests for distutils.command.bdist_msi.""" +import platform import sys import unittest from test.support import run_unittest from distutils.tests import support -@unittest.skipUnless(sys.platform == 'win32', 'these tests require Windows') +SKIP_MESSAGE = (None if sys.platform == "win32" and platform.win32_editionId() != 'IoTUAP' else + "These tests require Windows x86 or x64. ARM is not supported") + +@unittest.skipUnless(SKIP_MESSAGE is None, SKIP_MESSAGE) class BDistMSITestCase(support.TempdirManager, support.LoggingSilencer, unittest.TestCase): diff --git a/Lib/distutils/tests/test_bdist_wininst.py b/Lib/distutils/tests/test_bdist_wininst.py index 5d17ab19a9d89a..7f897610cfd01f 100644 --- a/Lib/distutils/tests/test_bdist_wininst.py +++ b/Lib/distutils/tests/test_bdist_wininst.py @@ -1,10 +1,15 @@ """Tests for distutils.command.bdist_wininst.""" +import platform import unittest from test.support import run_unittest from distutils.command.bdist_wininst import bdist_wininst from distutils.tests import support +SKIP_MESSAGE = (None if platform.win32_editionId() != 'IoTUAP' else + "These tests don't work on windows arm32") + +@unittest.skipUnless(SKIP_MESSAGE is None, SKIP_MESSAGE) class BuildWinInstTestCase(support.TempdirManager, support.LoggingSilencer, unittest.TestCase): diff --git a/Lib/distutils/tests/test_build_ext.py b/Lib/distutils/tests/test_build_ext.py index a72218274ca90e..c6408c3400a133 100644 --- a/Lib/distutils/tests/test_build_ext.py +++ b/Lib/distutils/tests/test_build_ext.py @@ -1,5 +1,6 @@ import sys import os +import platform from io import StringIO import textwrap @@ -21,6 +22,10 @@ ALREADY_TESTED = False +SKIP_MESSAGE = (None if platform.win32_editionId() != 'IoTUAP' else + "These tests don't work on windows arm32") + +@unittest.skipUnless(SKIP_MESSAGE is None, SKIP_MESSAGE) class BuildExtTestCase(TempdirManager, LoggingSilencer, unittest.TestCase): diff --git a/Lib/distutils/tests/test_msvc9compiler.py b/Lib/distutils/tests/test_msvc9compiler.py index 77a07ef39dd1a6..a2096619adecd1 100644 --- a/Lib/distutils/tests/test_msvc9compiler.py +++ b/Lib/distutils/tests/test_msvc9compiler.py @@ -1,4 +1,5 @@ """Tests for distutils.msvc9compiler.""" +import platform import sys import unittest import os @@ -90,7 +91,7 @@ """ -if sys.platform=="win32": +if sys.platform=="win32" and platform.win32_editionId() != 'IoTUAP': from distutils.msvccompiler import get_build_version if get_build_version()>=8.0: SKIP_MESSAGE = None diff --git a/Lib/distutils/tests/test_msvccompiler.py b/Lib/distutils/tests/test_msvccompiler.py index 70a9c93a4e8805..e62b9d96e41cfe 100644 --- a/Lib/distutils/tests/test_msvccompiler.py +++ b/Lib/distutils/tests/test_msvccompiler.py @@ -1,4 +1,5 @@ """Tests for distutils._msvccompiler.""" +import platform import sys import unittest import os @@ -8,7 +9,7 @@ from test.support import run_unittest -SKIP_MESSAGE = (None if sys.platform == "win32" else +SKIP_MESSAGE = (None if sys.platform == "win32" and platform.win32_editionId() != 'IoTUAP' else "These tests are only for win32") @unittest.skipUnless(SKIP_MESSAGE is None, SKIP_MESSAGE) diff --git a/Lib/distutils/tests/test_sysconfig.py b/Lib/distutils/tests/test_sysconfig.py index fe4a2994e3b0cd..3648eeb96a0706 100644 --- a/Lib/distutils/tests/test_sysconfig.py +++ b/Lib/distutils/tests/test_sysconfig.py @@ -1,5 +1,6 @@ """Tests for distutils.sysconfig.""" import os +import platform import shutil import subprocess import sys @@ -168,6 +169,7 @@ def test_SO_in_vars(self): self.assertIsNotNone(vars['SO']) self.assertEqual(vars['SO'], vars['EXT_SUFFIX']) + @unittest.skipIf(platform.win32_editionId() == 'IoTUAP', "API not present on Windows 10 IoT Core") def test_customize_compiler_before_get_config_vars(self): # Issue #21923: test that a Distribution compiler # instance can be called without an explicit call to diff --git a/PCbuild/_distutils_findvs.vcxproj b/PCbuild/_distutils_findvs.vcxproj index 1592182eefd8cf..ebf0f5680f358f 100644 --- a/PCbuild/_distutils_findvs.vcxproj +++ b/PCbuild/_distutils_findvs.vcxproj @@ -1,6 +1,10 @@  + + Debug + ARM + Debug Win32 @@ -9,6 +13,10 @@ Debug x64 + + PGInstrument + ARM + PGInstrument Win32 @@ -17,6 +25,10 @@ PGInstrument x64 + + PGUpdate + ARM + PGUpdate Win32 @@ -25,6 +37,10 @@ PGUpdate x64 + + Release + ARM + Release Win32 @@ -61,7 +77,7 @@ - version.lib;ole32.lib;oleaut32.lib;Microsoft.VisualStudio.Setup.Configuration.Native.lib;%(AdditionalDependencies) + version.lib;ole32.lib;oleaut32.lib;%(AdditionalDependencies) %(AdditionalLibraryDirectories);$(PySourcePath)PC\external\$(PlatformToolset)\$(ArchName) diff --git a/PCbuild/pcbuild.sln b/PCbuild/pcbuild.sln index bc11550b7c3f6c..8e9bc17db99bfb 100644 --- a/PCbuild/pcbuild.sln +++ b/PCbuild/pcbuild.sln @@ -992,7 +992,8 @@ Global {12728250-16EC-4DC6-94D7-E21DD88947F8}.Release|Win32.Build.0 = Release|Win32 {12728250-16EC-4DC6-94D7-E21DD88947F8}.Release|x64.ActiveCfg = Release|x64 {12728250-16EC-4DC6-94D7-E21DD88947F8}.Release|x64.Build.0 = Release|x64 - {41ADEDF9-11D8-474E-B4D7-BB82332C878E}.Debug|ARM.ActiveCfg = Debug|Win32 + {41ADEDF9-11D8-474E-B4D7-BB82332C878E}.Debug|ARM.ActiveCfg = Debug|ARM + {41ADEDF9-11D8-474E-B4D7-BB82332C878E}.Debug|ARM.Build.0 = Debug|ARM {41ADEDF9-11D8-474E-B4D7-BB82332C878E}.Debug|Win32.ActiveCfg = Debug|Win32 {41ADEDF9-11D8-474E-B4D7-BB82332C878E}.Debug|Win32.Build.0 = Debug|Win32 {41ADEDF9-11D8-474E-B4D7-BB82332C878E}.Debug|x64.ActiveCfg = Debug|x64 @@ -1007,7 +1008,8 @@ Global {41ADEDF9-11D8-474E-B4D7-BB82332C878E}.PGUpdate|Win32.Build.0 = PGUpdate|Win32 {41ADEDF9-11D8-474E-B4D7-BB82332C878E}.PGUpdate|x64.ActiveCfg = PGUpdate|x64 {41ADEDF9-11D8-474E-B4D7-BB82332C878E}.PGUpdate|x64.Build.0 = PGUpdate|x64 - {41ADEDF9-11D8-474E-B4D7-BB82332C878E}.Release|ARM.ActiveCfg = Release|Win32 + {41ADEDF9-11D8-474E-B4D7-BB82332C878E}.Release|ARM.ActiveCfg = Release|ARM + {41ADEDF9-11D8-474E-B4D7-BB82332C878E}.Release|ARM.Build.0 = Release|ARM {41ADEDF9-11D8-474E-B4D7-BB82332C878E}.Release|Win32.ActiveCfg = Release|Win32 {41ADEDF9-11D8-474E-B4D7-BB82332C878E}.Release|Win32.Build.0 = Release|Win32 {41ADEDF9-11D8-474E-B4D7-BB82332C878E}.Release|x64.ActiveCfg = Release|x64 diff --git a/Python/ceval.c b/Python/ceval.c index 4f0b8ee899c0ff..2f4c68488e42b7 100644 --- a/Python/ceval.c +++ b/Python/ceval.c @@ -1625,7 +1625,7 @@ _PyEval_EvalFrameDefault(PyFrameObject *f, int throwflag) exc = POP(); /* exc */ /* fall through */ case 0: -#ifdef _M_ARM +#if defined(_M_ARM) && !defined(DEBUG) // work around optimizer problem on windows arm32 if (oparg == 2) { diff --git a/Tools/winiot/sync_win_iot.py b/Tools/winiot/sync_win_iot.py index dea4ec6bbdd257..71a4cb355ad5ac 100644 --- a/Tools/winiot/sync_win_iot.py +++ b/Tools/winiot/sync_win_iot.py @@ -40,7 +40,7 @@ } EXCLUDE_FILE_FROM_LIBRARY = { - 'bdist_wininst.py', + #'bdist_wininst.py', } EXCLUDE_FILE_FROM_LIBS = { @@ -107,6 +107,13 @@ def include_in_lib(p): suffix = p.suffix.lower() return suffix not in {'.pyc', '.pyo', '.exe'} +def include_in_libs(p): + # if is_debug(p): + # print ('include_in_libs: {} is debug'.format(p)) + # return False + + return p.stem.lower() not in EXCLUDE_FILE_FROM_LIBS + def include_in_tools(p): if p.is_dir() and p.name.lower() in {'scripts', 'i18n', 'pynche', 'demo', 'parser'}: return True @@ -122,7 +129,10 @@ def include_in_tools(p): ('/', '$source', '{}.dll'.format(BASE_NAME), is_not_debug), ('DLLs/', '$source', '*.pyd', is_not_debug), ('DLLs/', '$source', '*.dll', is_not_python), + ('include/', 'include', '*.h', None), + ('include/', 'PC', 'pyconfig.h', None), ('Lib/', 'Lib', '**/*', include_in_lib), + ('libs/', '$source', '*.lib', include_in_libs), ('Tools/', 'Tools', '**/*', include_in_tools), ] @@ -131,9 +141,12 @@ def include_in_tools(p): ('/', '$source', 'pythonw_d.exe', is_debug), ('/', '$source', 'python{}_d.dll'.format(sys.version_info.major), is_debug), ('/', '$source', '{}_d.dll'.format(BASE_NAME), is_debug), + ('include/', 'include', '*.h', None), + ('include/', 'PC', 'pyconfig.h', None), ('DLLs/', '$source', '*.pyd', is_debug), ('DLLs/', '$source', '*.dll', is_not_python), ('Lib/', 'Lib', '**/*', include_in_lib), + ('libs/', '$source', '*.lib', include_in_libs), ('Tools/', 'Tools', '**/*', include_in_tools), ]