Skip to content

Commit 5293f2b

Browse files
committed
Pin base image and remove needless virtualenvs
1 parent 344eecd commit 5293f2b

File tree

9 files changed

+23
-170
lines changed

9 files changed

+23
-170
lines changed

dev/tasks/python-wheels/azure.linux.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,8 @@ jobs:
3838
set -ex
3939
cd arrow
4040
BUILD_IMAGE=centos-python-{{ wheel_tag }}
41-
# don't attempt to build it, because the base image by pypa is updated
42-
# regularly and would cause undeterministic builds
4341
docker-compose pull $BUILD_IMAGE
42+
docker-compose build $BUILD_IMAGE
4443
docker-compose run \
4544
-e SETUPTOOLS_SCM_PRETEND_VERSION={{ arrow.no_rc_version }} \
4645
-e PYTHON_VERSION="{{ python_version }}" \

python/manylinux1/Dockerfile-x86_64_base

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,10 @@
1414
# KIND, either express or implied. See the License for the
1515
# specific language governing permissions and limitations
1616
# under the License.
17-
FROM quay.io/pypa/manylinux1_x86_64:latest
17+
18+
# See https://quay.io/repository/pypa/manylinux1_x86_64?tab=history
19+
# to update base image.
20+
FROM quay.io/pypa/manylinux1_x86_64@sha256:e7ed385da2363ea796385bb106a98364f7a8a658a5e8dbf1b7e4c71f2f299251
1821

1922
# Install dependencies
2023
RUN yum install -y xz ccache flex wget && yum clean all
@@ -86,9 +89,6 @@ ENV GLOG_HOME /usr
8689
WORKDIR /
8790
RUN git clone https://github.com/matthew-brett/multibuild.git && cd multibuild && git checkout 68a4af043e2adb0d9353d4a0e1f3d871203237aa
8891

89-
ADD scripts/build_virtualenvs.sh /
90-
RUN /build_virtualenvs.sh
91-
9292
ADD scripts/build_llvm.sh /
9393
RUN /build_llvm.sh
9494

python/manylinux1/Dockerfile-x86_64_ubuntu

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,6 @@ RUN /install_cmake.sh
3636
WORKDIR /
3737
RUN git clone https://github.com/matthew-brett/multibuild.git && cd multibuild && git checkout 68a4af043e2adb0d9353d4a0e1f3d871203237aa
3838

39-
ADD scripts/build_virtualenvs.sh /
40-
RUN /build_virtualenvs.sh
41-
4239
ADD scripts/build_openssl.sh /
4340
RUN /build_openssl.sh
4441

python/manylinux1/build_arrow.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,14 +58,17 @@ export PYARROW_CMAKE_OPTIONS='-DTHRIFT_HOME=/usr -DBoost_NAMESPACE=arrow_boost -
5858
mkdir -p /io/dist
5959

6060
# Must pass PYTHON_VERSION and UNICODE_WIDTH env variables
61-
# possible values are: 2.7,16 2.7,32 3.5,16 3.6,16 3.7,16
61+
# possible values are: 2.7,16 2.7,32 3.5,16 3.6,16 3.7,16 3.8,16
6262

6363
CPYTHON_PATH="$(cpython_path ${PYTHON_VERSION} ${UNICODE_WIDTH})"
6464
PYTHON_INTERPRETER="${CPYTHON_PATH}/bin/python"
6565
PIP="${CPYTHON_PATH}/bin/pip"
6666
# Put our Python first to avoid picking up an antiquated Python from CMake
6767
PATH="${CPYTHON_PATH}/bin:${PATH}"
6868

69+
echo "=== (${PYTHON_VERSION}) Install the wheel build dependencies ==="
70+
$PIP install -r requirements-wheel.txt
71+
6972
if [ "${PYTHON_VERSION}" != "2.7" ]; then
7073
export PYARROW_WITH_FLIGHT=1
7174
export PYARROW_WITH_GANDIVA=1
@@ -123,9 +126,6 @@ popd
123126
# Check that we don't expose any unwanted symbols
124127
/io/scripts/check_arrow_visibility.sh
125128

126-
echo "=== (${PYTHON_VERSION}) Install the wheel build dependencies ==="
127-
$PIP install -r requirements-wheel.txt
128-
129129
# Clear output directories and leftovers
130130
rm -rf dist/
131131
rm -rf build/

python/manylinux1/scripts/build_virtualenvs.sh

Lines changed: 0 additions & 73 deletions
This file was deleted.

python/manylinux2010/Dockerfile-x86_64_base

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,9 @@
1515
# specific language governing permissions and limitations
1616
# under the License.
1717

18-
FROM quay.io/pypa/manylinux2010_x86_64:latest
18+
# See https://quay.io/repository/pypa/manylinux2010_x86_64?tab=history
19+
# to update base image.
20+
FROM quay.io/pypa/manylinux2010_x86_64@sha256:d41631c7360a0028876755aebb7036db639c24e7dcdaf3a9e6dcc0e74a681541
1921

2022
# Install build dependencies
2123
RUN yum install -y xz bison ccache flex wget
@@ -94,6 +96,3 @@ RUN /build_re2.sh
9496

9597
ADD scripts/build_bz2.sh /
9698
RUN /build_bz2.sh
97-
98-
ADD scripts/build_virtualenvs.sh /
99-
RUN /build_virtualenvs.sh

python/manylinux2010/build_arrow.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,13 +58,16 @@ export PYARROW_CMAKE_OPTIONS='-DBoost_NAMESPACE=arrow_boost -DBOOST_ROOT=/arrow_
5858
mkdir -p /io/dist
5959

6060
# Must pass PYTHON_VERSION and UNICODE_WIDTH env variables
61-
# possible values are: 2.7,16 2.7,32 3.5,16 3.6,16 3.7,16
61+
# possible values are: 2.7,16 2.7,32 3.5,16 3.6,16 3.7,16 3.8,16
6262

6363
CPYTHON_PATH="$(cpython_path ${PYTHON_VERSION} ${UNICODE_WIDTH})"
6464
PYTHON_INTERPRETER="${CPYTHON_PATH}/bin/python"
6565
PIP="${CPYTHON_PATH}/bin/pip"
6666
PATH="${PATH}:${CPYTHON_PATH}"
6767

68+
echo "=== (${PYTHON_VERSION}) Install the wheel build dependencies ==="
69+
$PIP install -r requirements-wheel.txt
70+
6871
if [ "${PYTHON_VERSION}" != "2.7" ]; then
6972
export PYARROW_WITH_FLIGHT=1
7073
export PYARROW_WITH_GANDIVA=1
@@ -123,9 +126,6 @@ popd
123126
# Check that we don't expose any unwanted symbols
124127
/io/scripts/check_arrow_visibility.sh
125128

126-
echo "=== (${PYTHON_VERSION}) Install the wheel build dependencies ==="
127-
$PIP install -r requirements-wheel.txt
128-
129129
# Clear output directories and leftovers
130130
rm -rf dist/
131131
rm -rf build/

python/manylinux2010/scripts/build_virtualenvs.sh

Lines changed: 0 additions & 73 deletions
This file was deleted.

python/requirements-wheel.txt

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
1+
Keras-Preprocessing
12
cython
2-
wheel==0.31.1
3+
futures; python_version < "3.2"
4+
numpy>=1.16
5+
pandas
36
setuptools_scm==3.2.0
47
six>=1.0.0
5-
numpy>=1.16
6-
futures; python_version < "3.2"
8+
# TODO: TensorFlow doesn't support Python 3.8 yet.
9+
tensorflow; python_version < "3.8"
10+
wheel==0.31.1

0 commit comments

Comments
 (0)