Update ARM64-detection on Macs

This commit is contained in:
Michael Mintz 2022-11-29 01:01:38 -05:00
parent c6a10fac00
commit 1a223c4724
2 changed files with 19 additions and 4 deletions

View File

@ -230,7 +230,10 @@ def main(override=None, intel_for_uc=None):
invalid_run_command()
if "darwin" in sys_plat:
if (
"arm" in platform.processor().lower()
(
"arm" in platform.processor().lower()
or "arm64" in platform.version().lower()
)
and not intel_for_uc
and int(use_version.split(".")[0]) > 105
):
@ -401,7 +404,10 @@ def main(override=None, intel_for_uc=None):
suffix = "WINDOWS"
elif "darwin" in sys_plat:
if (
"arm" in platform.processor().lower()
(
"arm" in platform.processor().lower()
or "arm64" in platform.version().lower()
)
and int(use_version.split(".")[0]) > 104
):
file_name = "edgedriver_mac64_m1.zip"
@ -647,7 +653,10 @@ def main(override=None, intel_for_uc=None):
if (
intel_for_uc
and "darwin" in sys_plat
and "arm" in platform.processor().lower()
and (
"arm" in platform.processor().lower()
or "arm64" in platform.version().lower()
)
):
f_name = "uc_driver"
new_file = os.path.join(downloads_folder, f_name)

View File

@ -51,7 +51,13 @@ PROXY_DIR_PATH = proxy_helper.PROXY_DIR_PATH
PROXY_DIR_LOCK = proxy_helper.PROXY_DIR_LOCK
PLATFORM = sys.platform
IS_ARM_MAC = False
if PLATFORM.endswith("darwin") and "arm" in platform.processor().lower():
if (
PLATFORM.endswith("darwin")
and (
"arm" in platform.processor().lower()
or "arm64" in platform.version().lower()
)
):
IS_ARM_MAC = True
IS_WINDOWS = False
LOCAL_CHROMEDRIVER = None