Skip to content

Commit 0d1a016

Browse files
jorisvandenbosscheraulcd
authored andcommitted
GH-39848: [Python][Packaging] Build pyarrow wheels with numpy RC instead of nightly (#41097)
### Rationale for this change Now NumPy has released a first RC for 2.0, we should update our PyArrow wheels to build with this released version instead of with the nightly numpy packages, to ensure we don't build our release wheels with an unstable numpy version. ### What changes are included in this PR? Increased the version requirement for numpy for the installed packages at build time to `numpy>=2.0.0rc1`, to force installing this RC instead of numpy 1.26 ### Are these changes tested? The wheel tests ensure that those wheels still work with older versions of numpy * GitHub Issue: #39848 Authored-by: Joris Van den Bossche <jorisvandenbossche@gmail.com> Signed-off-by: Raúl Cumplido <raulcumplido@gmail.com>
1 parent 41b99cb commit 0d1a016

5 files changed

Lines changed: 5 additions & 10 deletions

File tree

.env

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ VCPKG="a42af01b72c28a8e1d7b48107b33e4f286a55ef6" # 2023.11.20 Release
9898
# ci/docker/python-wheel-windows-vs2019.dockerfile.
9999
# This is a workaround for our CI problem that "archery docker build" doesn't
100100
# use pulled built images in dev/tasks/python-wheels/github.windows.yml.
101-
PYTHON_WHEEL_WINDOWS_IMAGE_REVISION=2024-03-19
101+
PYTHON_WHEEL_WINDOWS_IMAGE_REVISION=2024-04-09
102102

103103
# Use conanio/${CONAN} for "docker-compose run --rm conan". See
104104
# https://github.com/conan-io/conan-docker-tools#readme for available

ci/docker/python-wheel-manylinux.dockerfile

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,5 +99,4 @@ SHELL ["/bin/bash", "-i", "-c"]
9999
ENTRYPOINT ["/bin/bash", "-i", "-c"]
100100

101101
COPY python/requirements-wheel-build.txt /arrow/python/
102-
# TODO(GH-39848) Remove the `--pre --extra-index-url` for numpy nightly again before the 16.0 release
103-
RUN pip install -r /arrow/python/requirements-wheel-build.txt --pre --extra-index-url "https://pypi.anaconda.org/scientific-python-nightly-wheels/simple"
102+
RUN pip install -r /arrow/python/requirements-wheel-build.txt

ci/docker/python-wheel-windows-vs2019.dockerfile

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,7 @@ RUN choco install -r -y --no-progress python --version=%PYTHON_VERSION%
8989
RUN python -m pip install -U pip setuptools
9090

9191
COPY python/requirements-wheel-build.txt arrow/python/
92-
# TODO(GH-39848) Remove the `--pre --extra-index-url` for numpy nightly again before the 16.0 release
93-
RUN python -m pip install -r arrow/python/requirements-wheel-build.txt --pre --extra-index-url "https://pypi.anaconda.org/scientific-python-nightly-wheels/simple"
92+
RUN python -m pip install -r arrow/python/requirements-wheel-build.txt
9493

9594
# ENV CLCACHE_DIR="C:\clcache"
9695
# ENV CLCACHE_COMPRESS=1

ci/scripts/python_wheel_macos_build.sh

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,15 +50,12 @@ echo "=== (${PYTHON_VERSION}) Install Python build dependencies ==="
5050
export PIP_SITE_PACKAGES=$(python -c 'import site; print(site.getsitepackages()[0])')
5151
export PIP_TARGET_PLATFORM="macosx_${MACOSX_DEPLOYMENT_TARGET//./_}_${arch}"
5252

53-
# TODO(GH-39848) Remove the `--pre --extra-index-url` for numpy nightly again before the 16.0 release
5453
pip install \
5554
--upgrade \
5655
--only-binary=:all: \
5756
--target $PIP_SITE_PACKAGES \
5857
--platform $PIP_TARGET_PLATFORM \
59-
-r ${source_dir}/python/requirements-wheel-build.txt \
60-
--pre \
61-
--extra-index-url "https://pypi.anaconda.org/scientific-python-nightly-wheels/simple"
58+
-r ${source_dir}/python/requirements-wheel-build.txt
6259
pip install "delocate>=0.10.3"
6360

6461
echo "=== (${PYTHON_VERSION}) Building Arrow C++ libraries ==="
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
cython>=0.29.31
22
oldest-supported-numpy>=0.14; python_version<'3.9'
3-
numpy>=1.25; python_version>='3.9'
3+
numpy>=2.0.0rc1; python_version>='3.9'
44
setuptools_scm
55
setuptools>=58
66
wheel

0 commit comments

Comments
 (0)