From 510c4e644d1e50755337edc3c3448f015c12d049 Mon Sep 17 00:00:00 2001 From: Leonardo Barcaroli Date: Fri, 1 Mar 2019 09:07:05 +0100 Subject: [PATCH] Fix boring macos issue (booo for macos users). --- setup.py | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 8e4aad6..48272c6 100644 --- a/setup.py +++ b/setup.py @@ -108,6 +108,16 @@ def ensure_local_folder() -> None: pkg_resources.ensure_directory(bin_path) +PLATFORM_MAP = { + "win32": "win32", + "win64": "win64", + "linux32": "linux32", + "linux64": "linux64", + "darwin64": "macos", + "darwin32": "macos", # This is impossible (?) +} + + def assemble_driver_uri( version: T.Optional[str] = None, platform: T.Optional[str] = None ) -> str: @@ -129,7 +139,7 @@ def assemble_driver_uri( else: ext = "tar.gz" return "{base}/releases/download/{vers}/geckodriver-{vers}-{platform}.{ext}".format( - base=GECKO_RELEASE_PATH, vers=version, platform=platform, ext=ext + base=GECKO_RELEASE_PATH, vers=version, platform=PLATFORM_MAP[platform], ext=ext )