From 6f7ebace6b3bfc89d673124c8382c16fc4fd367a Mon Sep 17 00:00:00 2001 From: Niyas Sait Date: Wed, 10 Nov 2021 11:39:39 +0000 Subject: [PATCH 1/3] [win-arm64] Build without rustls package --- setup.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/setup.py b/setup.py index d65aa7654..384141792 100644 --- a/setup.py +++ b/setup.py @@ -19,6 +19,7 @@ import toml from setuptools import setup from setuptools.command.install import install +from setuptools._distutils.util import get_platform # Force the wheel to be platform specific # https://stackoverflow.com/a/45150383/3549270 @@ -69,7 +70,7 @@ def run(self): "--message-format=json", ] - if platform.machine() in ("ppc64le", "ppc64", "powerpc"): + if platform.machine() in ("ppc64le", "ppc64", "powerpc") or get_platform() == "win-arm64": cargo_args.extend( ["--no-default-features", "--features=upload,log,human-panic"] ) From 9a22e334c5a36a1d2ee57a84af7773db00d1a923 Mon Sep 17 00:00:00 2001 From: Niyas Sait Date: Wed, 10 Nov 2021 12:25:00 +0000 Subject: [PATCH 2/3] Fix linting errors --- setup.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 384141792..dd4681e9d 100644 --- a/setup.py +++ b/setup.py @@ -70,7 +70,10 @@ def run(self): "--message-format=json", ] - if platform.machine() in ("ppc64le", "ppc64", "powerpc") or get_platform() == "win-arm64": + if ( + platform.machine() in ("ppc64le", "ppc64", "powerpc") + or get_platform() == "win-arm64" + ): cargo_args.extend( ["--no-default-features", "--features=upload,log,human-panic"] ) From c1a303f9912bc60f39e9d755aced7d69785c377a Mon Sep 17 00:00:00 2001 From: Niyas Sait Date: Wed, 10 Nov 2021 13:05:14 +0000 Subject: [PATCH 3/3] Replace get_platform with sys.platform and platform.machine --- setup.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/setup.py b/setup.py index dd4681e9d..b7de2b135 100644 --- a/setup.py +++ b/setup.py @@ -19,7 +19,6 @@ import toml from setuptools import setup from setuptools.command.install import install -from setuptools._distutils.util import get_platform # Force the wheel to be platform specific # https://stackoverflow.com/a/45150383/3549270 @@ -70,9 +69,8 @@ def run(self): "--message-format=json", ] - if ( - platform.machine() in ("ppc64le", "ppc64", "powerpc") - or get_platform() == "win-arm64" + if platform.machine() in ("ppc64le", "ppc64", "powerpc") or ( + sys.platform == "win32" and platform.machine() == "ARM64" ): cargo_args.extend( ["--no-default-features", "--features=upload,log,human-panic"]