Skip to content

Commit 6c57b1d

Browse files
committed
Update windows test wheels dockerfiles to use MSIX
1 parent 02c761d commit 6c57b1d

File tree

3 files changed

+27
-65
lines changed

3 files changed

+27
-65
lines changed

ci/docker/python-free-threaded-wheel-windows-test-vs2022.dockerfile

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

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

Lines changed: 24 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,31 @@ RUN (if "%python%"=="3.10" setx PYTHON_VERSION "3.10.11" && setx PYTHON_CMD "py
3434
(if "%python%"=="3.13" setx PYTHON_VERSION "3.13.7" && setx PYTHON_CMD "py -3.13") & \
3535
(if "%python%"=="3.14" setx PYTHON_VERSION "3.14.0" && setx PYTHON_CMD "py -3.14")
3636

37+
SHELL ["powershell", "-NoProfile", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"]
38+
# Install Python install manager (MSIX)
39+
RUN $msix_url = 'https://www.python.org/ftp/python/installer/python.msix'; \
40+
Invoke-WebRequest -Uri $msix_url -OutFile 'python.msix'; \
41+
Add-AppxPackage .\python.msix
42+
43+
# Use python_abi_tag env var to select regular or free-threaded Python
44+
ARG freethreaded=0
45+
ENV PYTHON_MODE=${freethreaded}
46+
RUN if ($env:PYTHON_MODE -eq '1') { \
47+
pymanager install --version $env:PYTHON_VERSION --variant freethreaded \
48+
} else { \
49+
pymanager install --version $env:PYTHON_VERSION \
50+
}
51+
52+
SHELL ["cmd", "/S", "/C"]
3753
# hadolint ignore=DL3059
38-
RUN choco install -r -y --pre --no-progress --force python --version=%PYTHON_VERSION%
39-
# hadolint ignore=DL3059
40-
RUN %PYTHON_CMD% -m pip install -U pip setuptools
54+
RUN %PYTHON_CMD% -m pip install -U pip setuptools & \
55+
if "%python%"=="3.13" ( \
56+
setx REQUIREMENTS_FILE "requirements-wheel-test-3.13t.txt" \
57+
) else ( \
58+
setx REQUIREMENTS_FILE "requirements-wheel-test.txt" \
59+
)
4160

42-
COPY python/requirements-wheel-test.txt C:/arrow/python/
43-
RUN %PYTHON_CMD% -m pip install -r C:/arrow/python/requirements-wheel-test.txt
61+
COPY python/requirements-wheel-test-3.13t.txt python/requirements-wheel-test.txt C:/arrow/python/
62+
RUN %PYTHON_CMD% -m pip install -r C:/arrow/python/%REQUIREMENTS_FILE%
4463

4564
ENV PYTHON=$python

compose.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1445,6 +1445,7 @@ services:
14451445
args:
14461446
base: ${REPO}:python-wheel-windows-test-vs2022-base-${PYTHON_WHEEL_WINDOWS_TEST_IMAGE_REVISION}
14471447
python: ${PYTHON}
1448+
freethreaded: 0
14481449
context: .
14491450
dockerfile: ci/docker/python-wheel-windows-test-vs2022.dockerfile
14501451
volumes: *python-wheel-windows-vs2022-volumes
@@ -1456,8 +1457,9 @@ services:
14561457
args:
14571458
base: ${REPO}:python-wheel-windows-test-vs2022-base-${PYTHON_WHEEL_WINDOWS_TEST_IMAGE_REVISION}
14581459
python: ${PYTHON}
1460+
freethreaded: 1
14591461
context: .
1460-
dockerfile: ci/docker/python-free-threaded-wheel-windows-test-vs2022.dockerfile
1462+
dockerfile: ci/docker/python-wheel-windows-test-vs2022.dockerfile
14611463
volumes: *python-wheel-windows-vs2022-volumes
14621464
command: arrow\\ci\\scripts\\python_wheel_windows_test.bat
14631465

0 commit comments

Comments
 (0)