summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorPaul Monson <paulmon@users.noreply.github.com>2019-06-12 17:16:49 (GMT)
committerSteve Dower <steve.dower@python.org>2019-06-12 17:16:49 (GMT)
commitdaf62627518ad97ce66a48c49496aa0573cf0731 (patch)
tree463690188a1d1f87ea5b9423e2fdfcab069302a2 /Lib
parent5287022eeeb3c017d49fc8580b52e18377bf23f3 (diff)
downloadcpython-daf62627518ad97ce66a48c49496aa0573cf0731.zip
cpython-daf62627518ad97ce66a48c49496aa0573cf0731.tar.gz
cpython-daf62627518ad97ce66a48c49496aa0573cf0731.tar.bz2
bpo-37201: fix test_distutils failures for Windows ARM64 (GH-13902)
Diffstat (limited to 'Lib')
-rw-r--r--Lib/distutils/_msvccompiler.py2
-rw-r--r--Lib/distutils/tests/test_bdist_wininst.py4
-rw-r--r--Lib/distutils/util.py2
-rw-r--r--Lib/sysconfig.py2
4 files changed, 10 insertions, 0 deletions
diff --git a/Lib/distutils/_msvccompiler.py b/Lib/distutils/_msvccompiler.py
index c7ac3f0..6e14f33 100644
--- a/Lib/distutils/_msvccompiler.py
+++ b/Lib/distutils/_msvccompiler.py
@@ -93,6 +93,7 @@ PLAT_SPEC_TO_RUNTIME = {
'x86' : 'x86',
'x86_amd64' : 'x64',
'x86_arm' : 'arm',
+ 'x86_arm64' : 'arm64'
}
def _find_vcvarsall(plat_spec):
@@ -190,6 +191,7 @@ PLAT_TO_VCVARS = {
'win32' : 'x86',
'win-amd64' : 'x86_amd64',
'win-arm32' : 'x86_arm',
+ 'win-arm64' : 'x86_arm64'
}
# A set containing the DLLs that are guaranteed to be available for
diff --git a/Lib/distutils/tests/test_bdist_wininst.py b/Lib/distutils/tests/test_bdist_wininst.py
index 4c19bba..163f1cc 100644
--- a/Lib/distutils/tests/test_bdist_wininst.py
+++ b/Lib/distutils/tests/test_bdist_wininst.py
@@ -1,10 +1,14 @@
"""Tests for distutils.command.bdist_wininst."""
+import sys
+import platform
import unittest
from test.support import run_unittest
from distutils.command.bdist_wininst import bdist_wininst
from distutils.tests import support
+@unittest.skipIf(sys.platform == 'win32' and platform.machine() == 'ARM64',
+ 'bdist_wininst is not supported in this install')
@unittest.skipIf(getattr(bdist_wininst, '_unsupported', False),
'bdist_wininst is not supported in this install')
class BuildWinInstTestCase(support.TempdirManager,
diff --git a/Lib/distutils/util.py b/Lib/distutils/util.py
index 50550e1..17a94bc 100644
--- a/Lib/distutils/util.py
+++ b/Lib/distutils/util.py
@@ -40,6 +40,8 @@ def get_host_platform():
return 'win-amd64'
if '(arm)' in sys.version.lower():
return 'win-arm32'
+ if '(arm64)' in sys.version.lower():
+ return 'win-arm64'
return sys.platform
# Set for cross builds explicitly
diff --git a/Lib/sysconfig.py b/Lib/sysconfig.py
index 8446c8d..e76e692 100644
--- a/Lib/sysconfig.py
+++ b/Lib/sysconfig.py
@@ -628,6 +628,8 @@ def get_platform():
return 'win-amd64'
if '(arm)' in sys.version.lower():
return 'win-arm32'
+ if '(arm64)' in sys.version.lower():
+ return 'win-arm64'
return sys.platform
if os.name != "posix" or not hasattr(os, 'uname'):