From 57ac11b78470a41480c1b056ed11744e8de1fe09 Mon Sep 17 00:00:00 2001 From: Niyas Sait Date: Thu, 26 Aug 2021 09:07:57 +0100 Subject: add win/arm64 launchers --- setuptools/command/easy_install.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'setuptools/command') diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index 43bd2952..bd2f6235 100644 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -22,6 +22,7 @@ from distutils import log, dir_util from distutils.command.build_scripts import first_line_re from distutils.spawn import find_executable import sys +import platform import os import zipimport import shutil @@ -2263,7 +2264,10 @@ def get_win_launcher(type): """ launcher_fn = '%s.exe' % type if is_64bit(): - launcher_fn = launcher_fn.replace(".", "-64.") + if platform.machine() == "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) -- cgit v1.2.1 From 07cd207d2ddf6be23eb0deecfd890aefe8cb3f10 Mon Sep 17 00:00:00 2001 From: Niyas Sait Date: Thu, 26 Aug 2021 16:31:25 +0100 Subject: use distutils.util.get_platform to find the target platform This will be required to support cross compilation --- setuptools/command/easy_install.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'setuptools/command') diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index bd2f6235..8333e94a 100644 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -2264,7 +2264,7 @@ def get_win_launcher(type): """ launcher_fn = '%s.exe' % type if is_64bit(): - if platform.machine() == "ARM64": + if get_platform() == "win-arm64": launcher_fn = launcher_fn.replace(".", "-arm64.") else: launcher_fn = launcher_fn.replace(".", "-64.") -- cgit v1.2.1 From b38808146c6789f98e52aa7f1ad6631a6bf3370c Mon Sep 17 00:00:00 2001 From: Niyas Sait Date: Mon, 6 Sep 2021 12:14:35 +0100 Subject: Fix linting errors --- setuptools/command/easy_install.py | 1 - 1 file changed, 1 deletion(-) (limited to 'setuptools/command') diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index 8333e94a..031b612f 100644 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -22,7 +22,6 @@ from distutils import log, dir_util from distutils.command.build_scripts import first_line_re from distutils.spawn import find_executable import sys -import platform import os import zipimport import shutil -- cgit v1.2.1