kou commented on code in PR #43884:
URL: https://github.com/apache/arrow/pull/43884#discussion_r1737151205
##########
ci/scripts/install_gcs_testbench.sh:
##########
@@ -39,18 +39,21 @@ if [[ "${version}" -eq "default" ]]; then
version="v0.39.0"
fi
-: ${PIPX_PYTHON:=$(which python3)}
+# The Python to install pipx with
+: ${PIPX_BASE_PYTHON:=$(which python3)}
+# The Python to install the GCS testbench with
+: ${PIPX_PYTHON:=${PIPX_BASE_PYTHON:-$(which python3)}}
export PIP_BREAK_SYSTEM_PACKAGES=1
-${PIPX_PYTHON} -m pip install -U pipx
+${PIPX_BASE_PYTHON} -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
+${PIPX_BASE_PYTHON} -m pipx install ${pipx_flags} \
Review Comment:
Can we use an array and `"${pipx_flags[@]}"` like
https://github.com/apache/arrow/blob/main/ci/scripts/conan_build.sh does?
##########
ci/scripts/install_gcs_testbench.sh:
##########
@@ -39,18 +39,21 @@ if [[ "${version}" -eq "default" ]]; then
version="v0.39.0"
fi
-: ${PIPX_PYTHON:=$(which python3)}
+# The Python to install pipx with
+: ${PIPX_BASE_PYTHON:=$(which python3)}
+# The Python to install the GCS testbench with
+: ${PIPX_PYTHON:=${PIPX_BASE_PYTHON:-$(which python3)}}
export PIP_BREAK_SYSTEM_PACKAGES=1
-${PIPX_PYTHON} -m pip install -U pipx
+${PIPX_BASE_PYTHON} -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
Review Comment:
```suggestion
if [[ -n "${PIPX_PIP_ARGS}" ]]; then
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]