From bbe98122db4b915e5e0ab192cd315d25b6682be6 Mon Sep 17 00:00:00 2001 From: Joris Van den Bossche Date: Mon, 23 Sep 2024 17:12:35 +0200 Subject: [PATCH] install cython nightly for free-threaded build --- ci/docker/python-wheel-manylinux.dockerfile | 3 +++ ci/scripts/python_wheel_macos_build.sh | 5 +++++ 2 files changed, 8 insertions(+) diff --git a/ci/docker/python-wheel-manylinux.dockerfile b/ci/docker/python-wheel-manylinux.dockerfile index d22a70a2d777b..a9b6b8a855a1e 100644 --- a/ci/docker/python-wheel-manylinux.dockerfile +++ b/ci/docker/python-wheel-manylinux.dockerfile @@ -115,4 +115,7 @@ SHELL ["/bin/bash", "-i", "-c"] ENTRYPOINT ["/bin/bash", "-i", "-c"] COPY python/requirements-wheel-build.txt /arrow/python/ +RUN if [ "${python_abi_tag}" = "cp313t" ]; then \ + pip install cython --pre --extra-index-url "https://pypi.anaconda.org/scientific-python-nightly-wheels/simple" --prefer-binary ; \ + fi RUN pip install -r /arrow/python/requirements-wheel-build.txt diff --git a/ci/scripts/python_wheel_macos_build.sh b/ci/scripts/python_wheel_macos_build.sh index d2c392e6b9db3..8873bcbbe289e 100755 --- a/ci/scripts/python_wheel_macos_build.sh +++ b/ci/scripts/python_wheel_macos_build.sh @@ -49,6 +49,11 @@ fi echo "=== (${PYTHON_VERSION}) Install Python build dependencies ===" export PIP_SITE_PACKAGES=$(python -c 'import site; print(site.getsitepackages()[0])') +FREE_THREADED_BUILD="$(python -c"import sysconfig; print(bool(sysconfig.get_config_var('Py_GIL_DISABLED')))")" +if [[ $FREE_THREADED_BUILD == "True" ]]; then + pip install cython --pre --extra-index-url "https://pypi.anaconda.org/scientific-python-nightly-wheels/simple" --prefer-binary +fi + pip install \ --upgrade \ --only-binary=:all: \