Skip to content

Commit 73ca678

Browse files
committed
Try using pymanager to install Python for GCS testbench
1 parent 1ca2938 commit 73ca678

File tree

2 files changed

+4
-10
lines changed

2 files changed

+4
-10
lines changed

ci/docker/python-wheel-windows-vs2022-base.dockerfile

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -110,11 +110,8 @@ RUN curl https://dl.min.io/server/minio/release/windows-amd64/archive/minio.RELE
110110
--output "C:\Windows\Minio.exe"
111111

112112
# Install the GCS testbench using a well-known Python version.
113-
# NOTE: cannot use pipx's `--fetch-missing-python` because of
114-
# https://github.com/pypa/pipx/issues/1521, therefore download Python ourselves.
115-
RUN choco install -r -y --pre --no-progress python --version=3.11.9
116-
ENV PIPX_BIN_DIR=C:\\Windows\\
117-
ENV PIPX_PYTHON="C:\Python311\python.exe"
113+
ENV PIPX_PYTHON_VERSION=3.11
114+
RUN pymanager install %PIPX_PYTHON_VERSION%
118115
COPY ci/scripts/install_gcs_testbench.bat C:/arrow/ci/scripts/
119116
RUN call "C:\arrow\ci\scripts\install_gcs_testbench.bat" && `
120117
storage-testbench -h

ci/scripts/install_gcs_testbench.bat

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,11 @@
2020
set GCS_TESTBENCH_VERSION="v0.55.0"
2121

2222
set PIPX_FLAGS=--verbose
23-
if NOT "%PIPX_PYTHON%"=="" (
24-
set PIPX_FLAGS=--python %PIPX_PYTHON% %PIPX_FLAGS%
25-
)
2623

27-
python -m pip install -U pipx || exit /B 1
24+
py -%PIPX_PYTHON_VERSION% -m pip install -U pipx|| exit /B 1
2825

2926
@REM Install GCS testbench %GCS_TESTBENCH_VERSION%
30-
pipx install %PIPX_FLAGS% ^
27+
pipx install --python py %PIPX_FLAGS% ^
3128
"https://github.com/googleapis/storage-testbench/archive/%GCS_TESTBENCH_VERSION%.tar.gz" ^
3229
|| exit /B 1
3330

0 commit comments

Comments
 (0)