diff options
| author | Niyas Sait <niyas.sait@linaro.org> | 2021-08-26 09:07:57 +0100 |
|---|---|---|
| committer | Niyas Sait <niyas.sait@linaro.org> | 2021-08-26 09:07:57 +0100 |
| commit | 57ac11b78470a41480c1b056ed11744e8de1fe09 (patch) | |
| tree | f581ca14cb4128a86d91f7d9cd28d05de8724c47 /setuptools/tests/test_windows_wrappers.py | |
| parent | 0c302d232dd1a1f4ec531050532a84274edac2f4 (diff) | |
| download | python-setuptools-git-57ac11b78470a41480c1b056ed11744e8de1fe09.tar.gz | |
add win/arm64 launchers
Diffstat (limited to 'setuptools/tests/test_windows_wrappers.py')
| -rw-r--r-- | setuptools/tests/test_windows_wrappers.py | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/setuptools/tests/test_windows_wrappers.py b/setuptools/tests/test_windows_wrappers.py index 27853aae..05a604b2 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 @@ -50,11 +51,19 @@ class WrapperTester: w = pkg_resources.resource_string('setuptools', cls.wrapper_source) 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 +164,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(""" |
