Skip to content

Commit

Permalink
Fixes downloading snowflake driver for x86_64
Browse files Browse the repository at this point in the history
  • Loading branch information
sezaru committed Oct 19, 2023
1 parent 6bd37be commit 073bf79
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions lib/adbc_driver.ex
Original file line number Diff line number Diff line change
Expand Up @@ -83,25 +83,29 @@ defmodule Adbc.Driver do
end

defp driver_wheel(driver_name, version, triplet) do
case triplet do
"aarch64-apple-darwin" ->
case {triplet, driver_name} do
{"aarch64-apple-darwin", _} ->
{:ok, "adbc_driver_#{driver_name}-#{version}-py3-none-macosx_11_0_arm64.whl"}

"x86_64-apple-darwin" ->
{"x86_64-apple-darwin", _} ->
{:ok, "adbc_driver_#{driver_name}-#{version}-py3-none-macosx_10_9_x86_64.whl"}

"aarch64-linux-gnu" ->
{"aarch64-linux-gnu", _} ->
{:ok,
"adbc_driver_#{driver_name}-#{version}-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl"}

"x86_64-linux-gnu" ->
{"x86_64-linux-gnu", :snowflake} ->
{:ok,
"adbc_driver_#{driver_name}-#{version}-py3-none-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl"}

{"x86_64-linux-gnu", _} ->
{:ok,
"adbc_driver_#{driver_name}-#{version}-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl"}

"x86_64-windows-msvc" ->
{"x86_64-windows-msvc", _} ->
{:ok, "adbc_driver_#{driver_name}-#{version}-py3-none-win_amd64.whl"}

_ ->
{_, _} ->
{:error, "official driver does not have a precompiled version for `#{triplet}`"}
end
end
Expand Down

0 comments on commit 073bf79

Please sign in to comment.