Skip to content

Commit

Permalink
apacheGH-43883: [CI] Remove Python version guard when installing GCS …
Browse files Browse the repository at this point in the history
…testbench
  • Loading branch information
pitrou committed Sep 2, 2024
1 parent 9cafbb2 commit 4a5af8e
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 14 deletions.
14 changes: 10 additions & 4 deletions ci/docker/python-wheel-manylinux-test.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,19 @@ ARG arch
ARG python_image_tag
FROM ${arch}/python:${python_image_tag}

# RUN pip install --upgrade pip

# pandas doesn't provide wheel for aarch64 yet, so cache the compiled
# test dependencies in a docker image
COPY python/requirements-wheel-test.txt /arrow/python/
RUN pip install -r /arrow/python/requirements-wheel-test.txt

# Install the GCS testbench with the system Python
RUN apt-get update -y -q && \
apt-get install -y -q \
build-essential \
python3-dev && \
apt-get clean && \
rm -rf /var/lib/apt/lists*

COPY ci/scripts/install_gcs_testbench.sh /arrow/ci/scripts/
ARG python
RUN PYTHON_VERSION=${python} /arrow/ci/scripts/install_gcs_testbench.sh default
ENV PIPX_PYTHON=/usr/bin/python3 PIPX_PIP_ARGS=--prefer-binary
RUN /arrow/ci/scripts/install_gcs_testbench.sh default
19 changes: 9 additions & 10 deletions ci/scripts/install_gcs_testbench.sh
Original file line number Diff line number Diff line change
Expand Up @@ -42,15 +42,14 @@ fi
: ${PIPX_PYTHON:=$(which python3)}

export PIP_BREAK_SYSTEM_PACKAGES=1
${PIPX_PYTHON} -m pip install -U pipx
python3 -m pip install -U pipx

# This script is run with PYTHON undefined in some places,
# but those only use older pythons.
if [[ -z "${PYTHON_VERSION}" ]] || [[ "${PYTHON_VERSION}" != "3.13" ]]; then
pipx_flags=--verbose
if [[ $(id -un) == "root" ]]; then
# Install globally as /root/.local/bin is typically not in $PATH
pipx_flags="${pipx_flags} --global"
fi
${PIPX_PYTHON} -m pipx install ${pipx_flags} "https://github.com/googleapis/storage-testbench/archive/${version}.tar.gz"
pipx_flags="--verbose --python ${PIPX_PYTHON}"
if [[ $(id -un) == "root" ]]; then
# Install globally as /root/.local/bin is typically not in $PATH
pipx_flags="${pipx_flags} --global"
fi
if [[ ! -z "${PIPX_PIP_ARGS}" ]]; then
pipx_flags="${pipx_flags} --pip-args '${PIPX_PIP_ARGS}'"
fi
python3 -m pipx install ${pipx_flags} "https://github.com/googleapis/storage-testbench/archive/${version}.tar.gz"

0 comments on commit 4a5af8e

Please sign in to comment.