This is an automated email from the ASF dual-hosted git repository.

raulcd pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/arrow.git


The following commit(s) were added to refs/heads/main by this push:
     new 6fe0ff0c7f GH-43519: [Python][CI][Packaging] Use released versions to 
build and test wheels on Python 3.13 (#44193)
6fe0ff0c7f is described below

commit 6fe0ff0c7f61b1e4bcf279b82e3da6831a43662c
Author: Joris Van den Bossche <[email protected]>
AuthorDate: Thu Oct 10 18:47:29 2024 +0200

    GH-43519: [Python][CI][Packaging] Use released versions to build and test 
wheels on Python 3.13 (#44193)
    
    ### Rationale for this change
    
    Now that numpy, cython and pandas all have releases that support Python 
3.13, we can remove the extra index and ensure that we are building our wheels 
with the released version instead of nightly dev version.
    
    * GitHub Issue: #43519
    
    Authored-by: Joris Van den Bossche <[email protected]>
    Signed-off-by: Raúl Cumplido <[email protected]>
---
 ci/docker/python-wheel-manylinux.dockerfile | 5 +++++
 ci/scripts/python_wheel_macos_build.sh      | 9 ++++++++-
 python/requirements-wheel-build.txt         | 5 -----
 python/requirements-wheel-test.txt          | 6 ------
 4 files changed, 13 insertions(+), 12 deletions(-)

diff --git a/ci/docker/python-wheel-manylinux.dockerfile 
b/ci/docker/python-wheel-manylinux.dockerfile
index d22a70a2d7..452809ad09 100644
--- a/ci/docker/python-wheel-manylinux.dockerfile
+++ b/ci/docker/python-wheel-manylinux.dockerfile
@@ -114,5 +114,10 @@ RUN PYTHON_ROOT=$(find /opt/python -name 
cp${PYTHON_VERSION/./}-${PYTHON_ABI_TAG
 SHELL ["/bin/bash", "-i", "-c"]
 ENTRYPOINT ["/bin/bash", "-i", "-c"]
 
+# Remove once there are released Cython wheels for 3.13 free-threaded available
+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
+
 COPY python/requirements-wheel-build.txt /arrow/python/
 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 d2c392e6b9..91925e7abe 100755
--- a/ci/scripts/python_wheel_macos_build.sh
+++ b/ci/scripts/python_wheel_macos_build.sh
@@ -49,8 +49,15 @@ fi
 echo "=== (${PYTHON_VERSION}) Install Python build dependencies ==="
 export PIP_SITE_PACKAGES=$(python -c 'import site; 
print(site.getsitepackages()[0])')
 
+# Remove once there are released Cython wheels for 3.13 free-threaded available
+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
+# With Python 3.9, the `--upgrade` flag is required to force full replacement 
of setuptools' distutils patching
+pip install --upgrade --target $PIP_SITE_PACKAGES "setuptools>=58"
+
 pip install \
-  --upgrade \
   --only-binary=:all: \
   --target $PIP_SITE_PACKAGES \
   -r ${source_dir}/python/requirements-wheel-build.txt
diff --git a/python/requirements-wheel-build.txt 
b/python/requirements-wheel-build.txt
index 2d44800476..faa078d3d7 100644
--- a/python/requirements-wheel-build.txt
+++ b/python/requirements-wheel-build.txt
@@ -1,8 +1,3 @@
-# Remove pre and extra index url once there's NumPy and Cython wheels for 3.13
-# on PyPI
---pre
---extra-index-url 
"https://pypi.anaconda.org/scientific-python-nightly-wheels/simple";
-
 cython>=0.29.31
 oldest-supported-numpy>=0.14; python_version<'3.9'
 numpy>=2.0.0; python_version>='3.9'
diff --git a/python/requirements-wheel-test.txt 
b/python/requirements-wheel-test.txt
index d129ac753a..c051efb0aa 100644
--- a/python/requirements-wheel-test.txt
+++ b/python/requirements-wheel-test.txt
@@ -1,9 +1,3 @@
-# Remove pre and extra index url once there's NumPy and Cython wheels for 3.13
-# on PyPI
---pre
---prefer-binary
---extra-index-url 
"https://pypi.anaconda.org/scientific-python-nightly-wheels/simple";
-
 cffi
 cython
 hypothesis

Reply via email to