Skip to content

Commit 45d2dca

Browse files
authored
ENH: build free-threading wheels (#562)
1 parent 3ec7d6d commit 45d2dca

File tree

4 files changed

+14
-12
lines changed

4 files changed

+14
-12
lines changed

.github/workflows/release.yml

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,7 @@ jobs:
257257
"macos-13",
258258
"macos-latest",
259259
]
260-
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
260+
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14", "3.14t"]
261261
include:
262262
- os: "ubuntu-latest"
263263
artifact: pyogrio-wheel-linux-manylinux2014_x86_64
@@ -313,15 +313,12 @@ jobs:
313313
- name: Install dependencies and pyogrio wheel
314314
shell: bash
315315
run: |
316-
if [ ${{ matrix.python-version }} != "3.14" ]; then
317-
uv pip install -r ci/requirements-wheel-test.txt
318-
else
319-
uv pip install pytest numpy certifi packaging
320-
fi
316+
uv pip install -r ci/requirements-wheel-test.txt
321317
uv pip install --no-cache --pre --no-index --find-links wheelhouse pyogrio
322-
if [ ${{ matrix.python-version }} != "3.14" ]; then
323-
uv pip install --no-deps geopandas
318+
if [ ${{ matrix.python-version }} == "3.14t" ]; then
319+
uv pip install --pre --upgrade --extra-index-url https://pypi.anaconda.org/scientific-python-nightly-wheels/simple pandas
324320
fi
321+
uv pip install --no-deps geopandas
325322
uv pip list
326323
327324
- name: Run tests

CHANGES.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,9 @@
2727
- Add libspatialite to the wheels (#546).
2828
- Minimum required Python version is now 3.10 (#557).
2929
- Wheels are now available for Python 3.14 (#579).
30+
- Initial support for free-threaded Python builds, with the extension module
31+
declaring free-threaded support and wheels for Python 3.13t and 3.14t being
32+
built (#562).
3033

3134
## 0.11.1 (2025-08-02)
3235

pyproject.toml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[build-system]
22
requires = [
33
"setuptools",
4-
"Cython>=0.29",
4+
"Cython>=3.1",
55
"versioneer[toml]==0.28",
66
# tomli is used by versioneer
77
"tomli; python_version < '3.11'",
@@ -26,12 +26,13 @@ classifiers = [
2626
"Operating System :: OS Independent",
2727
"Programming Language :: Python :: 3",
2828
"Topic :: Scientific/Engineering :: GIS",
29+
"Programming Language :: Python :: Free Threading :: 2 - Beta",
2930
]
3031
requires-python = ">=3.10"
3132
dependencies = ["certifi", "numpy", "packaging"]
3233

3334
[project.optional-dependencies]
34-
dev = ["cython"]
35+
dev = ["cython>=3.1"]
3536
test = ["pytest", "pytest-cov"]
3637
benchmark = ["pytest-benchmark"]
3738
geopandas = ["geopandas"]
@@ -41,11 +42,12 @@ Home = "https://pyogrio.readthedocs.io/"
4142
Repository = "https://github.com/geopandas/pyogrio"
4243

4344
[tool.cibuildwheel]
44-
skip = ["*musllinux*", "cp31?t-*"]
45+
skip = ["*musllinux*"]
4546
archs = ["auto64"]
4647
manylinux-x86_64-image = "manylinux-x86_64-vcpkg-gdal:latest"
4748
manylinux-aarch64-image = "manylinux-aarch64-vcpkg-gdal:latest"
4849
build-verbosity = 3
50+
enable = ["cpython-freethreading"]
4951

5052
[tool.cibuildwheel.linux.environment]
5153
VCPKG_INSTALL = "$VCPKG_INSTALLATION_ROOT/installed/$VCPKG_DEFAULT_TRIPLET"

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ def get_gdal_config():
169169
Extension("pyogrio._ogr", ["pyogrio/_ogr.pyx"], **ext_options),
170170
Extension("pyogrio._vsi", ["pyogrio/_vsi.pyx"], **ext_options),
171171
],
172-
compiler_directives={"language_level": "3"},
172+
compiler_directives={"language_level": "3", "freethreading_compatible": True},
173173
compile_time_env=compile_time_env,
174174
)
175175

0 commit comments

Comments
 (0)