summaryrefslogtreecommitdiff
path: root/setuptools
diff options
context:
space:
mode:
authorJason R. Coombs <jaraco@jaraco.com>2021-10-01 22:18:58 -0400
committerGitHub <noreply@github.com>2021-10-01 22:18:58 -0400
commit8519d4e5cee54885761200a4b90204944d3ef729 (patch)
treeb732118327315197a47164fa6ce075654ddc6f9d /setuptools
parentbaaf8cdac81aa19db922c06a8f43bedf2c23c8d0 (diff)
parentcbbdb86c35e011ef46da6a45535683905aa857be (diff)
downloadpython-setuptools-git-8519d4e5cee54885761200a4b90204944d3ef729.tar.gz
Merge pull request #2758 from nsait-linaro/win_arm64_launchers
Fixes 2757: Add win/arm64 launchers to create arm64 executables
Diffstat (limited to 'setuptools')
-rw-r--r--setuptools/cli-arm64.exebin0 -> 137216 bytes
-rw-r--r--setuptools/command/easy_install.py5
-rw-r--r--setuptools/gui-arm64.exebin0 -> 137728 bytes
-rw-r--r--setuptools/tests/test_windows_wrappers.py15
4 files changed, 17 insertions, 3 deletions
diff --git a/setuptools/cli-arm64.exe b/setuptools/cli-arm64.exe
new file mode 100644
index 00000000..7a87ce48
--- /dev/null
+++ b/setuptools/cli-arm64.exe
Binary files differ
diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py
index 5e0f97cf..b88c3e9a 100644
--- a/setuptools/command/easy_install.py
+++ b/setuptools/command/easy_install.py
@@ -2263,7 +2263,10 @@ def get_win_launcher(type):
"""
launcher_fn = '%s.exe' % type
if is_64bit():
- launcher_fn = launcher_fn.replace(".", "-64.")
+ if get_platform() == "win-arm64":
+ launcher_fn = launcher_fn.replace(".", "-arm64.")
+ else:
+ launcher_fn = launcher_fn.replace(".", "-64.")
else:
launcher_fn = launcher_fn.replace(".", "-32.")
return resource_string('setuptools', launcher_fn)
diff --git a/setuptools/gui-arm64.exe b/setuptools/gui-arm64.exe
new file mode 100644
index 00000000..5730f11d
--- /dev/null
+++ b/setuptools/gui-arm64.exe
Binary files differ
diff --git a/setuptools/tests/test_windows_wrappers.py b/setuptools/tests/test_windows_wrappers.py
index 27853aae..8ac9bd07 100644
--- a/setuptools/tests/test_windows_wrappers.py
+++ b/setuptools/tests/test_windows_wrappers.py
@@ -13,6 +13,7 @@ are to wrap.
"""
import sys
+import platform
import textwrap
import subprocess
@@ -51,10 +52,20 @@ class WrapperTester:
f.write(w)
+def win_launcher_exe(prefix):
+ """ A simple routine to select launcher script based on platform."""
+ assert prefix in ('cli', 'gui')
+ if platform.machine() == "ARM64":
+ return "{}-arm64.exe".format(prefix)
+ else:
+ return "{}-32.exe".format(prefix)
+
+
class TestCLI(WrapperTester):
script_name = 'foo-script.py'
- wrapper_source = 'cli-32.exe'
wrapper_name = 'foo.exe'
+ wrapper_source = win_launcher_exe('cli')
+
script_tmpl = textwrap.dedent("""
#!%(python_exe)s
import sys
@@ -155,7 +166,7 @@ class TestGUI(WrapperTester):
-----------------------
"""
script_name = 'bar-script.pyw'
- wrapper_source = 'gui-32.exe'
+ wrapper_source = win_launcher_exe('gui')
wrapper_name = 'bar.exe'
script_tmpl = textwrap.dedent("""