Skip to content

Commit

Permalink
Added support for Apple M chips
Browse files Browse the repository at this point in the history
  • Loading branch information
giswqs committed Mar 30, 2023
1 parent f9bda8a commit 295c235
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions whitebox/download_wbt.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,17 @@ def download_wbt(linux_musl=False, reset=False, verbose=True):
links = {
"Windows": "https://www.whiteboxgeo.com/WBT_Windows/WhiteboxTools_win_amd64.zip",
"Darwin": "https://www.whiteboxgeo.com/WBT_Darwin/WhiteboxTools_darwin_amd64.zip",
"Darwin-arm": "https://www.whiteboxgeo.com/WBT_Darwin/WhiteboxTools_darwin_m_series.zip",
"Linux": "https://www.whiteboxgeo.com/WBT_Linux/WhiteboxTools_linux_amd64.zip",
"Linux-musl": "https://www.whiteboxgeo.com/WBT_Linux/WhiteboxTools_linux_musl.zip"
}

if linux_musl or ('google.colab' in sys.modules) or (os.environ.get('WBT_LINUX', False) == "MUSL"):
links["Linux"] = links["Linux-musl"]

if platform.system() == "Darwin" and platform.processor() == "arm":
links["Darwin"] = links["Darwin-arm"]

# These are backup links only used to pass GitHub automated tests. WhiteboxGeo links frequently encounter timeout errors, which fail the automated tests.
backup_links = {
"Windows": "https://github.com/giswqs/whitebox-bin/raw/master/WhiteboxTools_win_amd64.zip",
Expand Down
4 changes: 4 additions & 0 deletions whitebox/whitebox_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,13 +65,17 @@ def download_wbt(linux_musl=False, reset=False, verbose=True):
links = {
"Windows": "https://www.whiteboxgeo.com/WBT_Windows/WhiteboxTools_win_amd64.zip",
"Darwin": "https://www.whiteboxgeo.com/WBT_Darwin/WhiteboxTools_darwin_amd64.zip",
"Darwin-arm": "https://www.whiteboxgeo.com/WBT_Darwin/WhiteboxTools_darwin_m_series.zip",
"Linux": "https://www.whiteboxgeo.com/WBT_Linux/WhiteboxTools_linux_amd64.zip",
"Linux-musl": "https://www.whiteboxgeo.com/WBT_Linux/WhiteboxTools_linux_musl.zip"
}

if linux_musl or ('google.colab' in sys.modules) or (os.environ.get('WBT_LINUX', False) == "MUSL"):
links["Linux"] = links["Linux-musl"]

if platform.system() == "Darwin" and platform.processor() == "arm":
links["Darwin"] = links["Darwin-arm"]

# These are backup links only used to pass GitHub automated tests. WhiteboxGeo links frequently encounter timeout errors, which fail the automated tests.
backup_links = {
"Windows": "https://github.com/giswqs/whitebox-bin/raw/master/WhiteboxTools_win_amd64.zip",
Expand Down

0 comments on commit 295c235

Please sign in to comment.