Skip to content

Commit 742f82f

Browse files
committed
add windows arm64 build
1 parent 8944767 commit 742f82f

File tree

9 files changed

+56
-30
lines changed

9 files changed

+56
-30
lines changed

.github/workflows/packaging_wheels.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ jobs:
3333
python: [ cp39, cp310, cp311, cp312, cp313, cp314 ]
3434
platform:
3535
- { os: windows-2025, arch: amd64, cibw_system: win }
36+
- { os: windows-11-arm, arch: ARM64, cibw_system: win } # cibw requires ARM64 to be uppercase
3637
- { os: ubuntu-24.04, arch: x86_64, cibw_system: manylinux }
3738
- { os: ubuntu-24.04-arm, arch: aarch64, cibw_system: manylinux }
3839
- { os: macos-15, arch: arm64, cibw_system: macosx }

.github/workflows/targeted_test.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ on:
99
type: choice
1010
options:
1111
- 'windows-2025'
12+
- 'windows-11-arm'
1213
- 'ubuntu-24.04'
1314
- 'ubuntu-24.04-arm'
1415
- 'macos-15'
@@ -36,6 +37,11 @@ on:
3637
description: 'Custom test path (must be in tests/ directory, overrides testsuite)'
3738
required: false
3839
type: string
40+
verbose-uv:
41+
description: 'Let uv generate verbose output (pytest verbosity is always on)'
42+
required: false
43+
type: boolean
44+
default: true
3945

4046
jobs:
4147
test:
@@ -83,4 +89,4 @@ jobs:
8389
- name: Run tests
8490
shell: bash
8591
run: |
86-
uv run pytest -vv ${{ steps.test_path.outputs.test_path }}
92+
uv ${{ inputs.verbose-uv && 'run -v' || 'run' }} pytest -vv ${{ steps.test_path.outputs.test_path }}

pyproject.toml

Lines changed: 17 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,8 @@ exclude = [
184184
# - numpy: tensorflow doesn't play nice with numpy>2 so for every platform that can run tensorflow (cp39-cp311) we use
185185
# numpy<2. numpy<2 has no wheels for cp31[2|3], meaning an sdist will be used. However, on Windows amd64 +
186186
# cp313 this results in a segfault / access violation. To get around this, we install numpy>=2 on all >=cp312
187-
# platforms.
187+
# platforms. Then for windows arm64, for which there is no tensorflow, we only allow numpy>=2.3 because that
188+
# ships arm64 win32 wheels.
188189
######################################################################################################
189190

190191
[tool.uv]
@@ -197,13 +198,15 @@ environments = [ # no need to resolve packages beyond these platforms with uv...
197198
"python_version >= '3.9' and sys_platform == 'darwin' and platform_machine == 'arm64'",
198199
"python_version >= '3.9' and sys_platform == 'darwin' and platform_machine == 'x86_64'",
199200
"python_version >= '3.9' and sys_platform == 'win32' and platform_machine == 'AMD64'",
201+
"python_version >= '3.9' and sys_platform == 'win32' and platform_machine == 'ARM64'",
200202
"python_version >= '3.9' and sys_platform == 'linux' and platform_machine == 'x86_64'",
201203
"python_version >= '3.9' and sys_platform == 'linux' and platform_machine == 'aarch64'",
202204
]
203205
required-environments = [ # ... but do always resolve for all of them
204206
"python_version >= '3.9' and sys_platform == 'darwin' and platform_machine == 'arm64'",
205207
"python_version >= '3.9' and sys_platform == 'darwin' and platform_machine == 'x86_64'",
206208
"python_version >= '3.9' and sys_platform == 'win32' and platform_machine == 'AMD64'",
209+
"python_version >= '3.9' and sys_platform == 'win32' and platform_machine == 'ARM64'",
207210
"python_version >= '3.9' and sys_platform == 'linux' and platform_machine == 'x86_64'",
208211
"python_version >= '3.9' and sys_platform == 'linux' and platform_machine == 'aarch64'",
209212
]
@@ -226,17 +229,18 @@ stubdeps = [ # dependencies used for typehints in the stubs
226229
"fsspec",
227230
"pandas",
228231
"polars",
229-
"pyarrow",
232+
"pyarrow; sys_platform != 'win32' or platform_machine != 'ARM64'",
233+
"typing-extensions",
230234
]
231235
test = [ # dependencies used for running tests
232-
"adbc-driver-manager",
236+
"adbc-driver-manager; sys_platform != 'win32' or platform_machine != 'ARM64'",
233237
"pytest",
234238
"pytest-reraise",
235239
"pytest-timeout",
236240
"pytest-timestamper",
237241
"coverage",
238242
"gcovr",
239-
"gcsfs",
243+
"gcsfs; sys_platform != 'win32' or platform_machine != 'ARM64'",
240244
"packaging",
241245
"polars",
242246
"psutil",
@@ -246,16 +250,18 @@ test = [ # dependencies used for running tests
246250
"pytz",
247251
"requests",
248252
"urllib3",
249-
"fsspec>=2022.11.0",
253+
"fsspec>=2022.11.0; sys_platform != 'win32' or platform_machine != 'ARM64'",
250254
"pandas>=2.0.0",
251-
"pyarrow>=18.0.0",
252-
"torch>=2.2.2; python_version < '3.14' and ( sys_platform != 'darwin' or platform_machine != 'x86_64' or python_version < '3.13' )",
255+
"pyarrow>=18.0.0; sys_platform != 'win32' or platform_machine != 'ARM64'",
256+
"torch>=2.2.2; python_version < '3.14' and ( sys_platform != 'darwin' or platform_machine != 'x86_64' or python_version < '3.13' ) and ( sys_platform != 'win32' or platform_machine != 'ARM64' or python_version > '3.11' )",
253257
"tensorflow==2.14.0; sys_platform == 'darwin' and python_version < '3.12'",
254258
"tensorflow-cpu>=2.14.0; sys_platform == 'linux' and platform_machine != 'aarch64' and python_version < '3.12'",
255-
"tensorflow-cpu>=2.14.0; sys_platform == 'win32' and python_version < '3.12'",
259+
"tensorflow-cpu>=2.14.0; sys_platform == 'win32' and platform_machine != 'ARM64' and python_version < '3.12'",
256260
"tensorflow-cpu-aws==2.15.1; sys_platform == 'linux' and platform_machine == 'aarch64' and python_version < '3.12'",
257-
"numpy<2; python_version < '3.12'",
258-
"numpy>=2; python_version >= '3.12'",
261+
"typing-extensions",
262+
"numpy<2; ( sys_platform != 'win32' or platform_machine != 'ARM64' ) and python_version < '3.12'",
263+
"numpy>=2; ( sys_platform != 'win32' or platform_machine != 'ARM64' ) and python_version >= '3.12'",
264+
"numpy>=2.3; sys_platform == 'win32' and platform_machine == 'ARM64' and python_version >= '3.11'",
259265
]
260266
scripts = [ # dependencies used for running scripts
261267
"cxxheaderparser",
@@ -265,7 +271,7 @@ scripts = [ # dependencies used for running scripts
265271
"pandas",
266272
"pcpp",
267273
"polars",
268-
"pyarrow",
274+
"pyarrow; sys_platform != 'win32' or platform_machine != 'ARM64'",
269275
"pytz"
270276
]
271277
pypi = [ # dependencies used by the pypi cleanup script

tests/fast/adbc/test_adbc.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
import datetime
22
from pathlib import Path
33

4-
import adbc_driver_manager.dbapi
54
import numpy as np
6-
import pyarrow
75
import pytest
86

9-
import adbc_driver_duckdb.dbapi
7+
adbc_driver_manager = pytest.importorskip("adbc_driver_manager")
8+
adbc_driver_duckdb = pytest.importorskip("adbc_driver_duckdb")
9+
pyarrow = pytest.importorskip("pyarrow")
1010

1111
xfail = pytest.mark.xfail
1212
driver_path = adbc_driver_duckdb.driver_path()

tests/fast/adbc/test_connection_get_info.py

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,22 @@
1-
import pyarrow as pa
1+
import pytest
22

3-
import adbc_driver_duckdb.dbapi
43
import duckdb
54

5+
pa = pytest.importorskip("pyarrow")
6+
pytest.importorskip("adbc_driver_manager")
7+
adbc_driver_duckdb_dbapi = pytest.importorskip("adbc_driver_duckdb.dbapi")
8+
69

710
class TestADBCConnectionGetInfo:
811
def test_connection_basic(self):
9-
con = adbc_driver_duckdb.dbapi.connect()
12+
con = adbc_driver_duckdb_dbapi.connect()
1013
with con.cursor() as cursor:
1114
cursor.execute("select 42")
1215
res = cursor.fetchall()
1316
assert res == [(42,)]
1417

1518
def test_connection_get_info_all(self):
16-
con = adbc_driver_duckdb.dbapi.connect()
19+
con = adbc_driver_duckdb_dbapi.connect()
1720
adbc_con = con.adbc_connection
1821
res = adbc_con.get_info()
1922
reader = pa.RecordBatchReader._import_from_c(res.address)
@@ -37,7 +40,7 @@ def test_connection_get_info_all(self):
3740
assert string_values == expected_result
3841

3942
def test_empty_result(self):
40-
con = adbc_driver_duckdb.dbapi.connect()
43+
con = adbc_driver_duckdb_dbapi.connect()
4144
adbc_con = con.adbc_connection
4245
res = adbc_con.get_info([1337])
4346
reader = pa.RecordBatchReader._import_from_c(res.address)
@@ -48,7 +51,7 @@ def test_empty_result(self):
4851
assert values.num_chunks == 0
4952

5053
def test_unrecognized_codes(self):
51-
con = adbc_driver_duckdb.dbapi.connect()
54+
con = adbc_driver_duckdb_dbapi.connect()
5255
adbc_con = con.adbc_connection
5356
res = adbc_con.get_info([0, 1000, 4, 2000])
5457
reader = pa.RecordBatchReader._import_from_c(res.address)

tests/fast/adbc/test_statement_bind.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
import sys
22

3-
import adbc_driver_manager
4-
import pyarrow as pa
53
import pytest
64

7-
import adbc_driver_duckdb.dbapi
5+
pa = pytest.importorskip("pyarrow")
6+
adbc_driver_manager = pytest.importorskip("adbc_driver_manager")
7+
adbc_driver_duckdb_dbapi = pytest.importorskip("adbc_driver_duckdb.dbapi")
88

99
xfail = pytest.mark.xfail
1010

@@ -35,7 +35,7 @@ def test_bind_multiple_rows(self):
3535
names=["ints"],
3636
)
3737

38-
con = adbc_driver_duckdb.dbapi.connect()
38+
con = adbc_driver_duckdb_dbapi.connect()
3939
with con.cursor() as cursor:
4040
statement = cursor.adbc_statement
4141
statement.set_sql_query("select ? * 2 as i")
@@ -57,7 +57,7 @@ def test_bind_single_row(self):
5757
names=["ints"],
5858
)
5959

60-
con = adbc_driver_duckdb.dbapi.connect()
60+
con = adbc_driver_duckdb_dbapi.connect()
6161
with con.cursor() as cursor:
6262
statement = cursor.adbc_statement
6363
statement.set_sql_query("select ? * 2 as i")
@@ -93,7 +93,7 @@ def test_multiple_parameters(self):
9393
names=["ints", "strings", "bools"],
9494
)
9595

96-
con = adbc_driver_duckdb.dbapi.connect()
96+
con = adbc_driver_duckdb_dbapi.connect()
9797
with con.cursor() as cursor:
9898
statement = cursor.adbc_statement
9999
statement.set_sql_query("select ? as a, ? as b, ? as c")
@@ -123,7 +123,7 @@ def test_bind_composite_type(self):
123123
# Create the RecordBatch
124124
record_batch = pa.RecordBatch.from_arrays([struct_array], schema=schema)
125125

126-
con = adbc_driver_duckdb.dbapi.connect()
126+
con = adbc_driver_duckdb_dbapi.connect()
127127
with con.cursor() as cursor:
128128
statement = cursor.adbc_statement
129129
statement.set_sql_query("select ? as a")
@@ -146,7 +146,7 @@ def test_too_many_parameters(self):
146146
names=["ints", "strings"],
147147
)
148148

149-
con = adbc_driver_duckdb.dbapi.connect()
149+
con = adbc_driver_duckdb_dbapi.connect()
150150
with con.cursor() as cursor:
151151
statement = cursor.adbc_statement
152152
statement.set_sql_query("select ? as a")
@@ -175,7 +175,7 @@ def test_not_enough_parameters(self):
175175
names=["strings"],
176176
)
177177

178-
con = adbc_driver_duckdb.dbapi.connect()
178+
con = adbc_driver_duckdb_dbapi.connect()
179179
with con.cursor() as cursor:
180180
statement = cursor.adbc_statement
181181
statement.set_sql_query("select ? as a, ? as b")

tests/fast/arrow/test_2426.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
1+
import pytest
2+
13
import duckdb
24

5+
pytest.importorskip("pyarrow")
6+
37
try:
48
can_run = True
59
except Exception:

tests/fast/arrow/test_arrow_fetch.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
1+
import pytest
2+
13
import duckdb
24

5+
pytest.importorskip("pyarrow")
6+
7+
38
try:
49
can_run = True
510
except Exception:

tests/fast/test_all_types.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -534,6 +534,7 @@ def test_fetchnumpy(self, cur_type):
534534

535535
@pytest.mark.parametrize("cur_type", all_types)
536536
def test_arrow(self, cur_type):
537+
pytest.importorskip("pyarrow")
537538
try:
538539
pass
539540
except Exception:

0 commit comments

Comments
 (0)