|
| 1 | +# Licensed to the Apache Software Foundation (ASF) under one |
| 2 | +# or more contributor license agreements. See the NOTICE file |
| 3 | +# distributed with this work for additional information |
| 4 | +# regarding copyright ownership. The ASF licenses this file |
| 5 | +# to you under the Apache License, Version 2.0 (the |
| 6 | +# "License"); you may not use this file except in compliance |
| 7 | +# with the License. You may obtain a copy of the License at |
| 8 | +# |
| 9 | +# http://www.apache.org/licenses/LICENSE-2.0 |
| 10 | +# |
| 11 | +# Unless required by applicable law or agreed to in writing, |
| 12 | +# software distributed under the License is distributed on an |
| 13 | +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
| 14 | +# KIND, either express or implied. See the License for the |
| 15 | +# specific language governing permissions and limitations |
| 16 | +# under the License. |
| 17 | + |
| 18 | +# NOTE: You must update PYTHON_WHEEL_WINDOWS_TEST_IMAGE_REVISION in .env |
| 19 | +# when you update this file. |
| 20 | + |
| 21 | +ARG base |
| 22 | +# https://github.com/hadolint/hadolint/wiki/DL3006 |
| 23 | +# (Hadolint does not expand variables and thinks '${base}' is an untagged image) |
| 24 | +# hadolint ignore=DL3006 |
| 25 | +FROM ${base} |
| 26 | + |
| 27 | +ARG python=3.13 |
| 28 | + |
| 29 | +# hadolint ignore=SC1072 |
| 30 | +RUN (if "%python%"=="3.13" setx PYTHON_VERSION "3.13.1") & \ |
| 31 | + (if "%python%"=="3.14" setx PYTHON_VERSION "3.14.0") |
| 32 | + |
| 33 | +SHELL ["powershell", "-NoProfile", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"] |
| 34 | +RUN $version = $env:PYTHON_VERSION; \ |
| 35 | + $filename = 'python-' + $version + '-amd64.exe'; \ |
| 36 | + $url = 'https://www.python.org/ftp/python/' + $version + '/' + $filename; \ |
| 37 | + Invoke-WebRequest -Uri $url -OutFile $filename; \ |
| 38 | + Start-Process -FilePath $filename -ArgumentList '/quiet', 'Include_freethreaded=1' -Wait |
| 39 | + |
| 40 | +ENV PYTHON_CMD="py -${python}t" |
| 41 | + |
| 42 | +SHELL ["cmd", "/S", "/C"] |
| 43 | +RUN %PYTHON_CMD% -m pip install -U pip setuptools & \ |
| 44 | + if "%python%"=="3.13" ( \ |
| 45 | + setx REQUIREMENTS_FILE "requirements-wheel-test-3.13t.txt" \ |
| 46 | + ) else ( \ |
| 47 | + setx REQUIREMENTS_FILE "requirements-wheel-test.txt" \ |
| 48 | + ) |
| 49 | + |
| 50 | +COPY python/requirements-wheel-test-3.13t.txt python/requirements-wheel-test.txt C:/arrow/python/ |
| 51 | +# Cython and Pandas wheels for free-threaded are not released yet |
| 52 | +RUN %PYTHON_CMD% -m pip install \ |
| 53 | + --extra-index-url https://pypi.anaconda.org/scientific-python-nightly-wheels/simple \ |
| 54 | + --pre \ |
| 55 | + --prefer-binary \ |
| 56 | + -r C:/arrow/python/%REQUIREMENTS_FILE% |
| 57 | + |
| 58 | +ENV PYTHON="${python}t" |
| 59 | +ENV PYTHON_GIL=0 |
0 commit comments