Closed MarcelWilson closed 2 years ago
Thanks for the report. I'd like to fix this, but I don't own a mac, so checking versions is difficult. I'm tagging this for anybody who is more familiar with the current state of the OS who wants to come along and assist, or at least offer me some guidance on versioning.
Interesting, and good to know. I'm not sure that relying on the brand string is reliable enough, but it might be a better solution.
With only built-in packages:
import platform, shutil, subprocess
def is_m1() -> bool:
return (
platform.system().lower() == "darwin" and
shutil.which("sysctl") and
subprocess.check_output(
["sysctl", "-n", "machdep.cpu.brand_string"]
).decode("utf-8").lower().startswith("apple m1")
)
I'll make pr soon.
I have a macbook pro 2018 (intel) but pyderman 2.0.2 always attempts to download the m1 version of chromedriver.
Digging into the code a little, I noticed this in
__init__.py
platform.release()
for my machine returns'21.1.0'
don't know much about the platform versions, but I'm guessing this value needs to be adjusted.