Skip to content

Commit

Permalink
ARROW-7852: [Python] 0.16.0 wheels not compatible with older numpy
Browse files Browse the repository at this point in the history
Closes apache#6767 from kszucs/ARROW-7852

Authored-by: Krisztián Szűcs <[email protected]>
Signed-off-by: Antoine Pitrou <[email protected]>
  • Loading branch information
kszucs authored and pitrou committed Apr 2, 2020
1 parent fad2165 commit 6a583e5
Show file tree
Hide file tree
Showing 19 changed files with 43 additions and 46 deletions.
5 changes: 2 additions & 3 deletions .github/workflows/python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -184,9 +184,8 @@ jobs:
run: |
brew bundle --file=cpp/Brewfile
brew install coreutils python
pip3 install -r python/requirements.txt \
-r python/requirements-test.txt \
cython
pip3 install -r python/requirements-build.txt \
-r python/requirements-test.txt
- name: Build
shell: bash
run: |
Expand Down
4 changes: 2 additions & 2 deletions ci/docker/linux-apt-python-3.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,12 @@ RUN apt-get update -y -q && \
RUN ln -s /usr/bin/python3 /usr/local/bin/python && \
ln -s /usr/bin/pip3 /usr/local/bin/pip

COPY python/requirements.txt \
COPY python/requirements-build.txt \
python/requirements-test.txt \
/arrow/python/

RUN pip install \
-r arrow/python/requirements.txt \
-r arrow/python/requirements-build.txt \
-r arrow/python/requirements-test.txt \
setuptools

Expand Down
10 changes: 2 additions & 8 deletions ci/docker/linux-apt-r.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -71,14 +71,8 @@ RUN /arrow/ci/scripts/r_deps.sh /arrow
RUN ln -s /usr/bin/python3 /usr/local/bin/python && \
ln -s /usr/bin/pip3 /usr/local/bin/pip

COPY python/requirements.txt \
python/requirements-test.txt \
/arrow/python/

RUN pip install \
-r arrow/python/requirements.txt \
cython \
setuptools
COPY python/requirements-build.txt /arrow/python/
RUN pip install -r arrow/python/requirements-build.txt

ENV \
ARROW_BUILD_STATIC=OFF \
Expand Down
4 changes: 2 additions & 2 deletions ci/docker/linux-dnf-python-3.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,12 @@ RUN dnf install -y \
RUN ln -s /usr/bin/python3 /usr/local/bin/python && \
ln -s /usr/bin/pip3 /usr/local/bin/pip

COPY python/requirements.txt \
COPY python/requirements-build.txt \
python/requirements-test.txt \
/arrow/python/

RUN pip install \
-r arrow/python/requirements.txt \
-r arrow/python/requirements-build.txt \
-r arrow/python/requirements-test.txt

ENV ARROW_PYTHON=ON \
Expand Down
5 changes: 1 addition & 4 deletions dev/release/rat_exclude_files.txt
Original file line number Diff line number Diff line change
Expand Up @@ -168,10 +168,7 @@ python/MANIFEST.in
python/manylinux1/.dockerignore
python/pyarrow/includes/__init__.pxd
python/pyarrow/tests/__init__.py
python/requirements.txt
python/requirements-test.txt
python/requirements-wheel.txt
python/requirements-build.txt
python/requirements*.txt
pax_global_header
MANIFEST.in
__init__.pxd
Expand Down
2 changes: 1 addition & 1 deletion dev/release/verify-release-candidate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,7 @@ test_csharp() {
test_python() {
pushd python

pip install -r requirements.txt -r requirements-test.txt
pip install -r requirements-build.txt -r requirements-test.txt

export PYARROW_WITH_DATASET=1
export PYARROW_WITH_GANDIVA=1
Expand Down
1 change: 0 additions & 1 deletion dev/tasks/python-wheels/appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ os: Visual Studio 2015
environment:
ARCH: "64"
GENERATOR: Visual Studio 14 2015 Win64
NUMPY_VERSION: "1.14"
PYTHON_VERSION: "{{ python_version }}"
ARROW_SRC: C:\apache-arrow
PYARROW_VERSION: {{ arrow.no_rc_version }}
Expand Down
2 changes: 1 addition & 1 deletion dev/tasks/python-wheels/manylinux-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ python --version
# Install built wheel
pip install -q /arrow/python/$WHEEL_DIR/dist/*.whl
# Install test dependencies (pip won't work after removing system zlib)
pip install -q -r /arrow/python/requirements-test.txt
pip install -q -r /arrow/python/requirements-wheel-test.txt
# Run pyarrow tests
pytest -rs --pyargs pyarrow

Expand Down
4 changes: 2 additions & 2 deletions dev/tasks/python-wheels/osx-build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ function build_wheel {
export ARROW_HOME=`pwd`/arrow-dist
export PARQUET_HOME=`pwd`/arrow-dist

pip install $(pip_opts) -r python/requirements-wheel.txt cython
pip install $(pip_opts) -r python/requirements-wheel-build.txt

export PYARROW_WITH_GANDIVA=1
export BUILD_ARROW_GANDIVA=ON
Expand Down Expand Up @@ -138,7 +138,7 @@ function run_unit_tests {
pushd $1

# Install test dependencies
pip install $(pip_opts) -r python/requirements-test.txt
pip install $(pip_opts) -r python/requirements-wheel-test.txt

# Run pyarrow tests
pytest -rs --pyargs pyarrow
Expand Down
3 changes: 2 additions & 1 deletion dev/tasks/python-wheels/win-build-3.5.bat
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ call conda.bat activate wheel-build

@rem Cannot use conda_env_python.yml here because conda-forge has
@rem ceased providing up-to-date packages for Python 3.5
pip install -r %ARROW_SRC%\python\requirements-wheel.txt
pip install -r %ARROW_SRC%\python\requirements-wheel-build.txt

set ARROW_HOME=%CONDA_PREFIX%\Library
set PARQUET_HOME=%CONDA_PREFIX%\Library
Expand Down Expand Up @@ -79,6 +79,7 @@ call conda.bat activate wheel-test

@rem install the built wheel
pip install -vv %ARROW_SRC%\python\dist\pyarrow-%PYARROW_VERSION%-cp35-cp35m-win_amd64.whl || exit /B
pip install -q -r %ARROW_SRC%\python\requirements-wheel-test.txt || exit /B

@rem test the imports
python -c "import pyarrow; import pyarrow.parquet" || exit /B
Expand Down
12 changes: 4 additions & 8 deletions dev/tasks/python-wheels/win-build.bat
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,13 @@ conda update --yes --quiet conda
conda create -n wheel-build -q -y -c conda-forge ^
--file=%ARROW_SRC%\ci\conda_env_cpp.yml ^
--file=%ARROW_SRC%\ci\conda_env_gandiva.yml ^
python=%PYTHON_VERSION% ^
numpy=%NUMPY_VERSION% ^
|| exit /B
python=%PYTHON_VERSION% || exit /B

call conda.bat activate wheel-build

@rem Cannot use conda_env_python.yml here because conda-forge has
@rem ceased providing up-to-date packages for Python 3.5
pip install -r %ARROW_SRC%\python\requirements-wheel.txt
pip install -r %ARROW_SRC%\python\requirements-wheel-build.txt

set ARROW_HOME=%CONDA_PREFIX%\Library
set PARQUET_HOME=%CONDA_PREFIX%\Library
Expand Down Expand Up @@ -90,14 +88,12 @@ set ARROW_TEST_DATA=%ARROW_SRC%\testing\data

@rem test the wheel
@rem TODO For maximum reliability, we should test in a plain virtualenv instead.
conda create -n wheel-test -c conda-forge -q -y ^
--file %ARROW_SRC%\ci\conda_env_python.yml ^
python=%PYTHON_VERSION% ^
numpy=%NUMPY_VERSION% || exit /B
conda create -n wheel-test -c conda-forge -q -y python=%PYTHON_VERSION% || exit /B
call conda.bat activate wheel-test

@rem install the built wheel
pip install -vv --no-index --find-links=%ARROW_SRC%\python\dist\ pyarrow || exit /B
pip install -q -r %ARROW_SRC%\python\requirements-wheel-test.txt || exit /B

@rem test the imports
python -c "import pyarrow; import pyarrow.parquet; import pyarrow.flight; import pyarrow.dataset; import pyarrow.gandiva;" || exit /B
Expand Down
2 changes: 1 addition & 1 deletion python/manylinux1/build_arrow.sh
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ py_libname=$(${PYTHON_INTERPRETER} -c "import sysconfig; print(sysconfig.get_con
touch ${CPYTHON_PATH}/lib/${py_libname}

echo "=== (${PYTHON_VERSION}) Install the wheel build dependencies ==="
$PIP install -r requirements-wheel.txt
$PIP install -r requirements-wheel-build.txt

export PYARROW_WITH_DATASET=1
export PYARROW_WITH_FLIGHT=1
Expand Down
2 changes: 1 addition & 1 deletion python/manylinux201x/build_arrow.sh
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ py_libname=$(${PYTHON_INTERPRETER} -c "import sysconfig; print(sysconfig.get_con
touch ${CPYTHON_PATH}/lib/${py_libname}

echo "=== (${PYTHON_VERSION}) Install the wheel build dependencies ==="
$PIP install -r requirements-wheel.txt
$PIP install -r requirements-wheel-build.txt

export PYARROW_WITH_DATASET=1
export PYARROW_WITH_FLIGHT=1
Expand Down
6 changes: 3 additions & 3 deletions python/requirements-build.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
-r requirements.txt
-r requirements-test.txt
cython
cython>=0.29
numpy>=1.14
setuptools_scm
1 change: 0 additions & 1 deletion python/requirements-test.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
cffi
cython
hypothesis==5.0; python_version <= "3.5.2"
hypothesis; python_version > "3.5.2"
pandas==0.24; python_version <= "3.5.2"
Expand Down
7 changes: 7 additions & 0 deletions python/requirements-wheel-build.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Keras-Preprocessing
cython>=0.29.11
numpy==1.14.5; python_version < "3.8"
numpy==1.17.3; python_version >= "3.8"
pandas
setuptools_scm==3.2.0
wheel
12 changes: 12 additions & 0 deletions python/requirements-wheel-test.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
cffi
cython
hypothesis==5.0; python_version <= "3.5.2"
hypothesis; python_version > "3.5.2"
numpy==1.14.5; python_version < "3.8"
numpy==1.17.3; python_version >= "3.8"
pandas==0.24; python_version <= "3.5.2"
pandas; python_version > "3.5.2"
pickle5; python_version == "3.6" or python_version == "3.7"
pytest
pytest-lazy-fixture
pytz
6 changes: 0 additions & 6 deletions python/requirements-wheel.txt

This file was deleted.

1 change: 0 additions & 1 deletion python/requirements.txt

This file was deleted.

0 comments on commit 6a583e5

Please sign in to comment.