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 )