Fix boring macos issue (booo for macos users).
This commit is contained in:
parent
1c86362e64
commit
510c4e644d
12
setup.py
12
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
|
||||
)
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user