From e206ed94e0f0e11ecd829cd8bd260c1416a50be3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Vinot?= Date: Mon, 11 Aug 2025 11:22:35 +0200 Subject: [PATCH] ENH: Compile free-threading wheels --- .github/workflows/release.yml | 4 ++-- ci/manylinux2014_x86_64-vcpkg-gdal.Dockerfile | 2 +- ci/manylinux_2_28_aarch64-vcpkg-gdal.Dockerfile | 2 +- ci/manylinux_2_28_x86_64-vcpkg-gdal.Dockerfile | 2 +- pyproject.toml | 8 +++++--- setup.py | 2 +- 6 files changed, 11 insertions(+), 9 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 5c4f709d..3742c7c9 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -146,7 +146,7 @@ jobs: BUILDKIT_PROGRESS: plain - name: Build wheels - uses: pypa/cibuildwheel@v3.0.1 + uses: pypa/cibuildwheel@v3.1.3 - uses: actions/upload-artifact@v4 with: @@ -229,7 +229,7 @@ jobs: path: ${{ matrix.vcpkg_logs }} - name: Build wheels - uses: pypa/cibuildwheel@v3.0.1 + uses: pypa/cibuildwheel@v3.1.3 env: # CIBW needs to know triplet for the correct install path VCPKG_DEFAULT_TRIPLET: ${{ matrix.triplet }} diff --git a/ci/manylinux2014_x86_64-vcpkg-gdal.Dockerfile b/ci/manylinux2014_x86_64-vcpkg-gdal.Dockerfile index 0df57ceb..f63391d0 100644 --- a/ci/manylinux2014_x86_64-vcpkg-gdal.Dockerfile +++ b/ci/manylinux2014_x86_64-vcpkg-gdal.Dockerfile @@ -1,4 +1,4 @@ -FROM quay.io/pypa/manylinux2014_x86_64:2025-01-11-3165879 +FROM quay.io/pypa/manylinux2014_x86_64:2025.07.27-1 # building openssl needs IPC-Cmd (https://github.com/microsoft/vcpkg/issues/24988) RUN yum install -y curl unzip zip tar perl-IPC-Cmd diff --git a/ci/manylinux_2_28_aarch64-vcpkg-gdal.Dockerfile b/ci/manylinux_2_28_aarch64-vcpkg-gdal.Dockerfile index 28a65011..d4d8ef82 100644 --- a/ci/manylinux_2_28_aarch64-vcpkg-gdal.Dockerfile +++ b/ci/manylinux_2_28_aarch64-vcpkg-gdal.Dockerfile @@ -1,4 +1,4 @@ -FROM quay.io/pypa/manylinux_2_28_aarch64:2025-01-11-3165879 +FROM quay.io/pypa/manylinux_2_28_aarch64:2025.07.27-1 # building openssl needs IPC-Cmd (https://github.com/microsoft/vcpkg/issues/24988) RUN dnf -y install curl zip unzip tar ninja-build perl-IPC-Cmd diff --git a/ci/manylinux_2_28_x86_64-vcpkg-gdal.Dockerfile b/ci/manylinux_2_28_x86_64-vcpkg-gdal.Dockerfile index 9966903c..f8138955 100644 --- a/ci/manylinux_2_28_x86_64-vcpkg-gdal.Dockerfile +++ b/ci/manylinux_2_28_x86_64-vcpkg-gdal.Dockerfile @@ -1,4 +1,4 @@ -FROM quay.io/pypa/manylinux_2_28_x86_64:2025-01-11-3165879 +FROM quay.io/pypa/manylinux_2_28_x86_64:2025.07.27-1 # building openssl needs IPC-Cmd (https://github.com/microsoft/vcpkg/issues/24988) RUN dnf -y install curl zip unzip tar ninja-build perl-IPC-Cmd diff --git a/pyproject.toml b/pyproject.toml index d4d1640b..b8a26b0e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,7 +1,7 @@ [build-system] requires = [ "setuptools", - "Cython>=0.29", + "Cython>=3.1", "versioneer[toml]==0.28", # tomli is used by versioneer "tomli; python_version < '3.11'", @@ -26,12 +26,13 @@ classifiers = [ "Operating System :: OS Independent", "Programming Language :: Python :: 3", "Topic :: Scientific/Engineering :: GIS", + "Programming Language :: Python :: Free Threading :: 2 - Beta", ] requires-python = ">=3.9" dependencies = ["certifi", "numpy", "packaging"] [project.optional-dependencies] -dev = ["cython"] +dev = ["cython>=3.1"] test = ["pytest", "pytest-cov"] benchmark = ["pytest-benchmark"] geopandas = ["geopandas"] @@ -41,11 +42,12 @@ Home = "https://pyogrio.readthedocs.io/" Repository = "https://github.com/geopandas/pyogrio" [tool.cibuildwheel] -skip = ["pp*", "*musllinux*"] +skip = ["*musllinux*"] archs = ["auto64"] manylinux-x86_64-image = "manylinux-x86_64-vcpkg-gdal:latest" manylinux-aarch64-image = "manylinux-aarch64-vcpkg-gdal:latest" build-verbosity = 3 +enable = ["cpython-freethreading"] [tool.cibuildwheel.linux.environment] VCPKG_INSTALL = "$VCPKG_INSTALLATION_ROOT/installed/$VCPKG_DEFAULT_TRIPLET" diff --git a/setup.py b/setup.py index 10c4a03d..015cc43c 100644 --- a/setup.py +++ b/setup.py @@ -169,7 +169,7 @@ def get_gdal_config(): Extension("pyogrio._ogr", ["pyogrio/_ogr.pyx"], **ext_options), Extension("pyogrio._vsi", ["pyogrio/_vsi.pyx"], **ext_options), ], - compiler_directives={"language_level": "3"}, + compiler_directives={"language_level": "3", "freethreading_compatible": True}, compile_time_env=compile_time_env, )