Skip to content

Commit ecadfed

Browse files
committed
Update windows wheels dockerfiles to use MSIX
1 parent ee5fb3c commit ecadfed

File tree

3 files changed

+17
-70
lines changed

3 files changed

+17
-70
lines changed

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

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

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

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,22 @@ RUN (if "%python%"=="3.10" setx PYTHON_VERSION "3.10.11" && setx PYTHON_CMD "py
2929
(if "%python%"=="3.13" setx PYTHON_VERSION "3.13.7" && setx PYTHON_CMD "py -3.13") & \
3030
(if "%python%"=="3.14" setx PYTHON_VERSION "3.14.0" && setx PYTHON_CMD "py -3.14")
3131

32-
RUN choco install -r -y --pre --no-progress python --version=%PYTHON_VERSION%
32+
SHELL ["powershell", "-NoProfile", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"]
33+
# Install Python install manager (MSIX)
34+
RUN $msix_url = 'https://www.python.org/ftp/python/installer/python.msix'; \
35+
Invoke-WebRequest -Uri $msix_url -OutFile 'python.msix'; \
36+
Add-AppxPackage .\python.msix
37+
38+
# Use python_abi_tag env var to select regular or free-threaded Python
39+
ARG python_abi_tag=cp310
40+
ENV PYTHON_ABI_TAG=${python_abi_tag}
41+
RUN if ($env:PYTHON_ABI_TAG -match 't$') { \
42+
pymanager install --version $env:PYTHON_VERSION --variant freethreaded \
43+
} else { \
44+
pymanager install --version $env:PYTHON_VERSION \
45+
}
46+
47+
SHELL ["cmd", "/S", "/C"]
3348
RUN %PYTHON_CMD% -m pip install -U pip setuptools
3449

3550
COPY python/requirements-wheel-build.txt C:/arrow/python/

compose.yaml

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1404,6 +1404,7 @@ services:
14041404
args:
14051405
base: ${REPO}:python-wheel-windows-vs2022-base-vcpkg-${VCPKG}-${PYTHON_WHEEL_WINDOWS_IMAGE_REVISION}
14061406
python: ${PYTHON}
1407+
python_abi_tag: ${PYTHON_ABI_TAG}
14071408
context: .
14081409
dockerfile: ci/docker/python-wheel-windows-vs2022.dockerfile
14091410
# This should make the pushed images reusable, but the image gets rebuilt.
@@ -1414,22 +1415,6 @@ services:
14141415
volumes: *python-wheel-windows-vs2022-volumes
14151416
command: arrow\\ci\\scripts\\python_wheel_windows_build.bat
14161417

1417-
python-free-threaded-wheel-windows-vs2022:
1418-
image: ${REPO}:python-${PYTHON}-free-threaded-wheel-windows-vs2022-vcpkg-${VCPKG}-${PYTHON_WHEEL_WINDOWS_IMAGE_REVISION}
1419-
build:
1420-
args:
1421-
base: ${REPO}:python-wheel-windows-vs2022-base-vcpkg-${VCPKG}-${PYTHON_WHEEL_WINDOWS_IMAGE_REVISION}
1422-
python: ${PYTHON}
1423-
context: .
1424-
dockerfile: ci/docker/python-free-threaded-wheel-windows-vs2022.dockerfile
1425-
# This should make the pushed images reusable, but the image gets rebuilt.
1426-
# Uncomment if no local cache is available.
1427-
# cache_from:
1428-
# - mcr.microsoft.com/windows/servercore:ltsc2022
1429-
# - ${REPO}:python-${PYTHON}-free-threaded-wheel-windows-vs2022-vcpkg-${VCPKG}-${PYTHON_WHEEL_WINDOWS_IMAGE_REVISION}
1430-
volumes: *python-wheel-windows-vs2022-volumes
1431-
command: arrow\\ci\\scripts\\python_wheel_windows_build.bat
1432-
14331418
python-wheel-windows-test-base:
14341419
image: ${REPO}:python-wheel-windows-test-vs2022-base-${PYTHON_WHEEL_WINDOWS_TEST_IMAGE_REVISION}
14351420
build:

0 commit comments

Comments
 (0)