diff --git a/.env b/.env index 6d64d284780..6f830ca229b 100644 --- a/.env +++ b/.env @@ -102,8 +102,8 @@ VCPKG="4334d8b4c8916018600212ab4dd4bbdc343065d1" # 2025.09.17 Release # ci/docker/python-*-windows-*.dockerfile or the vcpkg config. # This is a workaround for our CI problem that "archery docker build" doesn't # use pulled built images in dev/tasks/python-wheels/github.windows.yml. -PYTHON_WHEEL_WINDOWS_IMAGE_REVISION=2026-01-22 -PYTHON_WHEEL_WINDOWS_TEST_IMAGE_REVISION=2026-01-22 +PYTHON_WHEEL_WINDOWS_IMAGE_REVISION=2026-01-27 +PYTHON_WHEEL_WINDOWS_TEST_IMAGE_REVISION=2026-01-27 # Use conanio/${CONAN_BASE}:{CONAN_VERSION} for "docker compose run --rm conan". # See https://github.com/conan-io/conan-docker-tools#readme and diff --git a/ci/docker/python-free-threaded-wheel-windows-test-vs2022.dockerfile b/ci/docker/python-free-threaded-wheel-windows-test-vs2022.dockerfile index ab257b271e5..0ffb08edf8f 100644 --- a/ci/docker/python-free-threaded-wheel-windows-test-vs2022.dockerfile +++ b/ci/docker/python-free-threaded-wheel-windows-test-vs2022.dockerfile @@ -26,18 +26,12 @@ FROM ${base} ARG python=3.13 -# hadolint ignore=SC1072 -RUN (if "%python%"=="3.13" setx PYTHON_VERSION "3.13.1") & \ - (if "%python%"=="3.14" setx PYTHON_VERSION "3.14.0") - -SHELL ["powershell", "-NoProfile", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"] -RUN $version = $env:PYTHON_VERSION; \ - $filename = 'python-' + $version + '-amd64.exe'; \ - $url = 'https://www.python.org/ftp/python/' + $version + '/' + $filename; \ - Invoke-WebRequest -Uri $url -OutFile $filename; \ - Start-Process -FilePath $filename -ArgumentList '/quiet', 'Include_freethreaded=1' -Wait - -ENV PYTHON_CMD="py -${python}t" +ARG python_variant_suffix="" +ENV PYTHON_VERSION=${python}${python_variant_suffix} + +RUN pymanager install %PYTHON_VERSION% + +ENV PYTHON_CMD="py -${python}${python_variant_suffix}" SHELL ["cmd", "/S", "/C"] RUN %PYTHON_CMD% -m pip install -U pip setuptools & \ diff --git a/ci/docker/python-wheel-windows-test-vs2022-base.dockerfile b/ci/docker/python-wheel-windows-test-vs2022-base.dockerfile deleted file mode 100644 index bd1da7b14b3..00000000000 --- a/ci/docker/python-wheel-windows-test-vs2022-base.dockerfile +++ /dev/null @@ -1,65 +0,0 @@ -# escape=` - -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. - -# NOTE: You must update PYTHON_WHEEL_WINDOWS_TEST_IMAGE_REVISION in .env -# when you update this file. - -FROM mcr.microsoft.com/windows/servercore:ltsc2022 - -# Ensure we in a command shell and not Powershell -SHELL ["cmd", "/S", "/C"] - -# Install MSVC BuildTools -# -# The set of components below (lines starting with --add) is the most minimal -# set we could find that would still compile Arrow C++. -RUN ` - curl -SL --output vs_buildtools.exe https://aka.ms/vs/17/release/vs_buildtools.exe ` - && (start /w vs_buildtools.exe --quiet --wait --norestart --nocache ` - --installPath "%ProgramFiles(x86)%\Microsoft Visual Studio\2022\BuildTools" ` - --add Microsoft.VisualStudio.Component.VC.CoreBuildTools ` - --add Microsoft.VisualStudio.Component.VC.Tools.x86.x64 ` - --add Microsoft.VisualStudio.Component.Windows11SDK.26100 ` - --add Microsoft.VisualStudio.Component.VC.CMake.Project ` - || IF "%ERRORLEVEL%"=="3010" EXIT 0) ` - && del /q vs_buildtools.exe - -# Install choco CLI -# -# We switch into Powershell just for this command and switch back to cmd -# See https://chocolatey.org/install#completely-offline-install -SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"] -RUN ` - Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1')) -SHELL ["cmd", "/S", "/C"] - -# Install git, wget, minio -RUN choco install --no-progress -r -y git wget -RUN curl https://dl.min.io/server/minio/release/windows-amd64/archive/minio.RELEASE.2025-01-20T14-49-07Z ` - --output "C:\Windows\Minio.exe" - -# Install the GCS testbench using a well-known Python version. -# NOTE: cannot use pipx's `--fetch-missing-python` because of -# https://github.com/pypa/pipx/issues/1521, therefore download Python ourselves. -RUN choco install -r -y --pre --no-progress python --version=3.11.9 -ENV PIPX_BIN_DIR=C:\\Windows\\ -ENV PIPX_PYTHON="C:\Python311\python.exe" -COPY ci/scripts/install_gcs_testbench.bat C:/arrow/ci/scripts/ -RUN call "C:\arrow\ci\scripts\install_gcs_testbench.bat" && ` - storage-testbench -h diff --git a/ci/docker/python-wheel-windows-test-vs2022.dockerfile b/ci/docker/python-wheel-windows-test-vs2022.dockerfile index 73a9e167fea..5a5bf1506a6 100644 --- a/ci/docker/python-wheel-windows-test-vs2022.dockerfile +++ b/ci/docker/python-wheel-windows-test-vs2022.dockerfile @@ -26,16 +26,15 @@ FROM ${base} # hadolint shell=cmd.exe -# Define the full version number otherwise choco falls back to patch number 0 (3.10 => 3.10.0) ARG python=3.10 -RUN (if "%python%"=="3.10" setx PYTHON_VERSION "3.10.11" && setx PYTHON_CMD "py -3.10") & \ - (if "%python%"=="3.11" setx PYTHON_VERSION "3.11.9" && setx PYTHON_CMD "py -3.11") & \ - (if "%python%"=="3.12" setx PYTHON_VERSION "3.12.10" && setx PYTHON_CMD "py -3.12") & \ - (if "%python%"=="3.13" setx PYTHON_VERSION "3.13.9" && setx PYTHON_CMD "py -3.13") & \ - (if "%python%"=="3.14" setx PYTHON_VERSION "3.14.0" && setx PYTHON_CMD "py -3.14") -# hadolint ignore=DL3059 -RUN choco install -r -y --pre --no-progress --force python --version=%PYTHON_VERSION% +ARG python_variant_suffix="" +ENV PYTHON_VERSION=${python}${python_variant_suffix} + +RUN pymanager install %PYTHON_VERSION% + +ENV PYTHON_CMD="py -${python}${python_variant_suffix}" + # hadolint ignore=DL3059 RUN %PYTHON_CMD% -m pip install -U pip setuptools diff --git a/ci/docker/python-wheel-windows-vs2022-base.dockerfile b/ci/docker/python-wheel-windows-vs2022-base.dockerfile index 426286ebe07..1d53e863017 100644 --- a/ci/docker/python-wheel-windows-vs2022-base.dockerfile +++ b/ci/docker/python-wheel-windows-vs2022-base.dockerfile @@ -104,6 +104,21 @@ RUN choco install --no-progress -r -y git gzip ninja wget # Add UNIX tools to PATH RUN setx path "%path%;C:\Program Files\Git\usr\bin" +# Install git, wget, minio +RUN choco install --no-progress -r -y git wget +RUN curl https://dl.min.io/server/minio/release/windows-amd64/archive/minio.RELEASE.2025-01-20T14-49-07Z ` + --output "C:\Windows\Minio.exe" + +# Install the GCS testbench using a well-known Python version. +# NOTE: cannot use pipx's `--fetch-missing-python` because of +# https://github.com/pypa/pipx/issues/1521, therefore download Python ourselves. +RUN choco install -r -y --pre --no-progress python --version=3.11.9 +ENV PIPX_BIN_DIR=C:\\Windows\\ +ENV PIPX_PYTHON="C:\Python311\python.exe" +COPY ci/scripts/install_gcs_testbench.bat C:/arrow/ci/scripts/ +RUN call "C:\arrow\ci\scripts\install_gcs_testbench.bat" && ` + storage-testbench -h + # Install vcpkg # # Compiling vcpkg itself from a git tag doesn't work anymore since vcpkg has diff --git a/ci/docker/python-wheel-windows-vs2022.dockerfile b/ci/docker/python-wheel-windows-vs2022.dockerfile index e25ebef156c..0ed5be4939a 100644 --- a/ci/docker/python-wheel-windows-vs2022.dockerfile +++ b/ci/docker/python-wheel-windows-vs2022.dockerfile @@ -21,7 +21,6 @@ ARG base FROM ${base} -# Define the full version number otherwise choco falls back to patch number 0 (3.10 => 3.10.0) ARG python=3.10 ARG python_variant_suffix="" diff --git a/compose.yaml b/compose.yaml index c99f19e35e0..3474643fe6e 100644 --- a/compose.yaml +++ b/compose.yaml @@ -178,7 +178,6 @@ x-hierarchy: - python-wheel-windows-vs2022-base: - python-wheel-windows-vs2022 - python-free-threaded-wheel-windows-vs2022 - - python-wheel-windows-test-base: - python-wheel-windows-test - python-free-threaded-wheel-windows-test @@ -1416,18 +1415,11 @@ services: volumes: *python-wheel-windows-vs2022-volumes command: arrow\\ci\\scripts\\python_wheel_windows_build.bat - python-wheel-windows-test-base: - image: ${REPO}:python-wheel-windows-test-vs2022-base-${PYTHON_WHEEL_WINDOWS_TEST_IMAGE_REVISION} - build: - context: . - dockerfile: ci/docker/python-wheel-windows-test-vs2022-base.dockerfile - volumes: *python-wheel-windows-vs2022-volumes - python-wheel-windows-test: image: ${REPO}:python-${PYTHON}-wheel-windows-test-vs2022-${PYTHON_WHEEL_WINDOWS_TEST_IMAGE_REVISION} build: args: - base: ${REPO}:python-wheel-windows-test-vs2022-base-${PYTHON_WHEEL_WINDOWS_TEST_IMAGE_REVISION} + base: ${REPO}:python-wheel-windows-vs2022-base-vcpkg-${VCPKG}-${PYTHON_WHEEL_WINDOWS_IMAGE_REVISION} python: ${PYTHON} context: . dockerfile: ci/docker/python-wheel-windows-test-vs2022.dockerfile @@ -1438,8 +1430,9 @@ services: image: ${REPO}:python-${PYTHON}-free-threaded-wheel-windows-test-vs2022-${PYTHON_WHEEL_WINDOWS_TEST_IMAGE_REVISION} build: args: - base: ${REPO}:python-wheel-windows-test-vs2022-base-${PYTHON_WHEEL_WINDOWS_TEST_IMAGE_REVISION} + base: ${REPO}:python-wheel-windows-vs2022-base-vcpkg-${VCPKG}-${PYTHON_WHEEL_WINDOWS_IMAGE_REVISION} python: ${PYTHON} + python_variant_suffix: t context: . dockerfile: ci/docker/python-free-threaded-wheel-windows-test-vs2022.dockerfile volumes: *python-wheel-windows-vs2022-volumes