From 82267b6159bfadb7dfe1aaa084f1ffe177940001 Mon Sep 17 00:00:00 2001 From: Joseph Ferguson Date: Mon, 19 Oct 2026 16:20:48 -0700 Subject: [PATCH] Add 3.16-rc windows variants --- .../windowsservercore-ltsc2022/Dockerfile | 8 +-- .../windowsservercore-ltsc2025/Dockerfile | 8 +-- .../windowsservercore-ltsc2022/Dockerfile | 8 +-- .../windowsservercore-ltsc2025/Dockerfile | 8 +-- .../windowsservercore-ltsc2022/Dockerfile | 8 +-- .../windowsservercore-ltsc2025/Dockerfile | 8 +-- .../windowsservercore-ltsc2022/Dockerfile | 58 +++++++++++++++++++ .../windowsservercore-ltsc2025/Dockerfile | 58 +++++++++++++++++++ Dockerfile-windows.template | 48 +++++++++++++-- versions.json | 17 ++++-- versions.sh | 17 ++++-- 11 files changed, 208 insertions(+), 38 deletions(-) create mode 100644 3.16-rc/windows/windowsservercore-ltsc2022/Dockerfile create mode 100644 3.16-rc/windows/windowsservercore-ltsc2025/Dockerfile diff --git a/3.13/windows/windowsservercore-ltsc2022/Dockerfile b/3.13/windows/windowsservercore-ltsc2022/Dockerfile index 1c7fc0a9a..a1323dfac 100644 --- a/3.13/windows/windowsservercore-ltsc2022/Dockerfile +++ b/3.13/windows/windowsservercore-ltsc2022/Dockerfile @@ -14,7 +14,7 @@ ENV PYTHONIOENCODING UTF-8 ENV PYTHON_VERSION 3.13.17 ENV PYTHON_SHA256 5da012101ba2e17113a9a1cd901e9ce1441086f2b7ecb5de06ec94163899a190 -RUN $url = ('https://www.python.org/ftp/python/{0}/python-{1}-amd64.exe' -f ($env:PYTHON_VERSION -replace '[a-z]+[0-9]*$', ''), $env:PYTHON_VERSION); \ +RUN $url = 'https://www.python.org/ftp/python/3.13.17/python-3.13.17-amd64.exe'; \ Write-Host ('Downloading {0} ...' -f $url); \ [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; \ Invoke-WebRequest -Uri $url -OutFile 'python.exe'; \ @@ -48,13 +48,13 @@ RUN $url = ('https://www.python.org/ftp/python/{0}/python-{1}-amd64.exe' -f ($en # the installer updated PATH, so we should refresh our local value $env:PATH = [Environment]::GetEnvironmentVariable('PATH', [EnvironmentVariableTarget]::Machine); \ \ - Write-Host 'Verifying install ...'; \ - Write-Host ' python --version'; python --version; \ - \ Write-Host 'Removing ...'; \ Remove-Item python.exe -Force; \ Remove-Item $env:TEMP/Python*.log -Force; \ \ + Write-Host 'Verifying install ("python --version") ...'; \ + python --version; \ + \ $env:PYTHONDONTWRITEBYTECODE = '1'; \ \ Write-Host 'Verifying pip install ...'; \ diff --git a/3.13/windows/windowsservercore-ltsc2025/Dockerfile b/3.13/windows/windowsservercore-ltsc2025/Dockerfile index aa32e868b..e777f6d6f 100644 --- a/3.13/windows/windowsservercore-ltsc2025/Dockerfile +++ b/3.13/windows/windowsservercore-ltsc2025/Dockerfile @@ -14,7 +14,7 @@ ENV PYTHONIOENCODING UTF-8 ENV PYTHON_VERSION 3.13.17 ENV PYTHON_SHA256 5da012101ba2e17113a9a1cd901e9ce1441086f2b7ecb5de06ec94163899a190 -RUN $url = ('https://www.python.org/ftp/python/{0}/python-{1}-amd64.exe' -f ($env:PYTHON_VERSION -replace '[a-z]+[0-9]*$', ''), $env:PYTHON_VERSION); \ +RUN $url = 'https://www.python.org/ftp/python/3.13.17/python-3.13.17-amd64.exe'; \ Write-Host ('Downloading {0} ...' -f $url); \ [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; \ Invoke-WebRequest -Uri $url -OutFile 'python.exe'; \ @@ -48,13 +48,13 @@ RUN $url = ('https://www.python.org/ftp/python/{0}/python-{1}-amd64.exe' -f ($en # the installer updated PATH, so we should refresh our local value $env:PATH = [Environment]::GetEnvironmentVariable('PATH', [EnvironmentVariableTarget]::Machine); \ \ - Write-Host 'Verifying install ...'; \ - Write-Host ' python --version'; python --version; \ - \ Write-Host 'Removing ...'; \ Remove-Item python.exe -Force; \ Remove-Item $env:TEMP/Python*.log -Force; \ \ + Write-Host 'Verifying install ("python --version") ...'; \ + python --version; \ + \ $env:PYTHONDONTWRITEBYTECODE = '1'; \ \ Write-Host 'Verifying pip install ...'; \ diff --git a/3.14/windows/windowsservercore-ltsc2022/Dockerfile b/3.14/windows/windowsservercore-ltsc2022/Dockerfile index 619122749..15df3b1d0 100644 --- a/3.14/windows/windowsservercore-ltsc2022/Dockerfile +++ b/3.14/windows/windowsservercore-ltsc2022/Dockerfile @@ -14,7 +14,7 @@ ENV PYTHONIOENCODING UTF-8 ENV PYTHON_VERSION 3.14.9 ENV PYTHON_SHA256 a247a0b612244a803f507b39fb7121e3602e4160d59c3b99d98e735289c53394 -RUN $url = ('https://www.python.org/ftp/python/{0}/python-{1}-amd64.exe' -f ($env:PYTHON_VERSION -replace '[a-z]+[0-9]*$', ''), $env:PYTHON_VERSION); \ +RUN $url = 'https://www.python.org/ftp/python/3.14.9/python-3.14.9-amd64.exe'; \ Write-Host ('Downloading {0} ...' -f $url); \ [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; \ Invoke-WebRequest -Uri $url -OutFile 'python.exe'; \ @@ -48,13 +48,13 @@ RUN $url = ('https://www.python.org/ftp/python/{0}/python-{1}-amd64.exe' -f ($en # the installer updated PATH, so we should refresh our local value $env:PATH = [Environment]::GetEnvironmentVariable('PATH', [EnvironmentVariableTarget]::Machine); \ \ - Write-Host 'Verifying install ...'; \ - Write-Host ' python --version'; python --version; \ - \ Write-Host 'Removing ...'; \ Remove-Item python.exe -Force; \ Remove-Item $env:TEMP/Python*.log -Force; \ \ + Write-Host 'Verifying install ("python --version") ...'; \ + python --version; \ + \ $env:PYTHONDONTWRITEBYTECODE = '1'; \ \ Write-Host 'Verifying pip install ...'; \ diff --git a/3.14/windows/windowsservercore-ltsc2025/Dockerfile b/3.14/windows/windowsservercore-ltsc2025/Dockerfile index d1bf7d489..1d78d66bb 100644 --- a/3.14/windows/windowsservercore-ltsc2025/Dockerfile +++ b/3.14/windows/windowsservercore-ltsc2025/Dockerfile @@ -14,7 +14,7 @@ ENV PYTHONIOENCODING UTF-8 ENV PYTHON_VERSION 3.14.9 ENV PYTHON_SHA256 a247a0b612244a803f507b39fb7121e3602e4160d59c3b99d98e735289c53394 -RUN $url = ('https://www.python.org/ftp/python/{0}/python-{1}-amd64.exe' -f ($env:PYTHON_VERSION -replace '[a-z]+[0-9]*$', ''), $env:PYTHON_VERSION); \ +RUN $url = 'https://www.python.org/ftp/python/3.14.9/python-3.14.9-amd64.exe'; \ Write-Host ('Downloading {0} ...' -f $url); \ [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; \ Invoke-WebRequest -Uri $url -OutFile 'python.exe'; \ @@ -48,13 +48,13 @@ RUN $url = ('https://www.python.org/ftp/python/{0}/python-{1}-amd64.exe' -f ($en # the installer updated PATH, so we should refresh our local value $env:PATH = [Environment]::GetEnvironmentVariable('PATH', [EnvironmentVariableTarget]::Machine); \ \ - Write-Host 'Verifying install ...'; \ - Write-Host ' python --version'; python --version; \ - \ Write-Host 'Removing ...'; \ Remove-Item python.exe -Force; \ Remove-Item $env:TEMP/Python*.log -Force; \ \ + Write-Host 'Verifying install ("python --version") ...'; \ + python --version; \ + \ $env:PYTHONDONTWRITEBYTECODE = '1'; \ \ Write-Host 'Verifying pip install ...'; \ diff --git a/3.15/windows/windowsservercore-ltsc2022/Dockerfile b/3.15/windows/windowsservercore-ltsc2022/Dockerfile index e90326edb..7b6e13225 100644 --- a/3.15/windows/windowsservercore-ltsc2022/Dockerfile +++ b/3.15/windows/windowsservercore-ltsc2022/Dockerfile @@ -14,7 +14,7 @@ ENV PYTHONIOENCODING UTF-8 ENV PYTHON_VERSION 3.15.1 ENV PYTHON_SHA256 8b23839c6b2f3076fdff44c78d219a5393c7205f666cd95bd0c9a562bf8ea5db -RUN $url = ('https://www.python.org/ftp/python/{0}/python-{1}-amd64.exe' -f ($env:PYTHON_VERSION -replace '[a-z]+[0-9]*$', ''), $env:PYTHON_VERSION); \ +RUN $url = 'https://www.python.org/ftp/python/3.15.1/python-3.15.1-amd64.exe'; \ Write-Host ('Downloading {0} ...' -f $url); \ [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; \ Invoke-WebRequest -Uri $url -OutFile 'python.exe'; \ @@ -48,13 +48,13 @@ RUN $url = ('https://www.python.org/ftp/python/{0}/python-{1}-amd64.exe' -f ($en # the installer updated PATH, so we should refresh our local value $env:PATH = [Environment]::GetEnvironmentVariable('PATH', [EnvironmentVariableTarget]::Machine); \ \ - Write-Host 'Verifying install ...'; \ - Write-Host ' python --version'; python --version; \ - \ Write-Host 'Removing ...'; \ Remove-Item python.exe -Force; \ Remove-Item $env:TEMP/Python*.log -Force; \ \ + Write-Host 'Verifying install ("python --version") ...'; \ + python --version; \ + \ $env:PYTHONDONTWRITEBYTECODE = '1'; \ \ Write-Host 'Verifying pip install ...'; \ diff --git a/3.15/windows/windowsservercore-ltsc2025/Dockerfile b/3.15/windows/windowsservercore-ltsc2025/Dockerfile index ba12eb40c..5264c0502 100644 --- a/3.15/windows/windowsservercore-ltsc2025/Dockerfile +++ b/3.15/windows/windowsservercore-ltsc2025/Dockerfile @@ -14,7 +14,7 @@ ENV PYTHONIOENCODING UTF-8 ENV PYTHON_VERSION 3.15.1 ENV PYTHON_SHA256 8b23839c6b2f3076fdff44c78d219a5393c7205f666cd95bd0c9a562bf8ea5db -RUN $url = ('https://www.python.org/ftp/python/{0}/python-{1}-amd64.exe' -f ($env:PYTHON_VERSION -replace '[a-z]+[0-9]*$', ''), $env:PYTHON_VERSION); \ +RUN $url = 'https://www.python.org/ftp/python/3.15.1/python-3.15.1-amd64.exe'; \ Write-Host ('Downloading {0} ...' -f $url); \ [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; \ Invoke-WebRequest -Uri $url -OutFile 'python.exe'; \ @@ -48,13 +48,13 @@ RUN $url = ('https://www.python.org/ftp/python/{0}/python-{1}-amd64.exe' -f ($en # the installer updated PATH, so we should refresh our local value $env:PATH = [Environment]::GetEnvironmentVariable('PATH', [EnvironmentVariableTarget]::Machine); \ \ - Write-Host 'Verifying install ...'; \ - Write-Host ' python --version'; python --version; \ - \ Write-Host 'Removing ...'; \ Remove-Item python.exe -Force; \ Remove-Item $env:TEMP/Python*.log -Force; \ \ + Write-Host 'Verifying install ("python --version") ...'; \ + python --version; \ + \ $env:PYTHONDONTWRITEBYTECODE = '1'; \ \ Write-Host 'Verifying pip install ...'; \ diff --git a/3.16-rc/windows/windowsservercore-ltsc2022/Dockerfile b/3.16-rc/windows/windowsservercore-ltsc2022/Dockerfile new file mode 100644 index 000000000..7e58b3943 --- /dev/null +++ b/3.16-rc/windows/windowsservercore-ltsc2022/Dockerfile @@ -0,0 +1,58 @@ +# +# NOTE: THIS DOCKERFILE IS GENERATED VIA "apply-templates.sh" +# +# PLEASE DO NOT EDIT IT DIRECTLY. +# + +FROM mcr.microsoft.com/windows/servercore:ltsc2022 + +SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"] + +# https://github.com/docker-library/python/pull/557 +ENV PYTHONIOENCODING UTF-8 + +# PATH isn't actually set in the Docker image, so we have to set it from within the container +RUN $newPath = ('C:\Python;C:\Python\Scripts;{0}' -f $env:PATH); \ + Write-Host ('Updating PATH: {0}' -f $newPath); \ + [Environment]::SetEnvironmentVariable('PATH', $newPath, [EnvironmentVariableTarget]::Machine); \ + Write-Host 'Complete.' +# doing this first to share cache across versions more aggressively + +ENV PYTHON_VERSION 3.16.0a1 +ENV PYTHON_SHA256 d70c353262f6a2ccd50cd5aa9273e22bc217a75d9ce1855b07b83fc2e6296454 + +RUN $url = 'https://www.python.org/ftp/python/3.16.0/python-3.16.0a1-amd64.zip'; \ + Write-Host ('Downloading {0} ...' -f $url); \ + [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; \ + Invoke-WebRequest -Uri $url -OutFile 'python.zip'; \ + \ + Write-Host ('Verifying sha256 ({0}) ...' -f $env:PYTHON_SHA256); \ + if ((Get-FileHash python.zip -Algorithm sha256).Hash -ne $env:PYTHON_SHA256) { \ + Write-Host 'FAILED!'; \ + exit 1; \ + }; \ + \ + Write-Host 'Expanding ...'; \ + Expand-Archive python.zip -DestinationPath C:\Python\; \ + \ + Write-Host 'Removing ...'; \ + Remove-Item python.zip -Force; \ + \ + Write-Host 'Verifying install ("python --version") ...'; \ + python --version; \ + \ + $env:PYTHONDONTWRITEBYTECODE = '1'; \ + \ + Write-Host 'Re-Installing pip ...'; \ + # remove zip-provided pip so that we can reinstall and get the exe in c:/python/Scripts + Remove-Item -Recurse C:/python/Lib/site-packages/pip; \ + Remove-Item -Recurse C:/python/Lib/site-packages/pip-*; \ + # install pip again + python -m ensurepip --default-pip; \ + \ + Write-Host 'Verifying pip install ...'; \ + pip --version; \ + \ + Write-Host 'Complete.' + +CMD ["python"] diff --git a/3.16-rc/windows/windowsservercore-ltsc2025/Dockerfile b/3.16-rc/windows/windowsservercore-ltsc2025/Dockerfile new file mode 100644 index 000000000..5b1d6ebc1 --- /dev/null +++ b/3.16-rc/windows/windowsservercore-ltsc2025/Dockerfile @@ -0,0 +1,58 @@ +# +# NOTE: THIS DOCKERFILE IS GENERATED VIA "apply-templates.sh" +# +# PLEASE DO NOT EDIT IT DIRECTLY. +# + +FROM mcr.microsoft.com/windows/servercore:ltsc2025 + +SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"] + +# https://github.com/docker-library/python/pull/557 +ENV PYTHONIOENCODING UTF-8 + +# PATH isn't actually set in the Docker image, so we have to set it from within the container +RUN $newPath = ('C:\Python;C:\Python\Scripts;{0}' -f $env:PATH); \ + Write-Host ('Updating PATH: {0}' -f $newPath); \ + [Environment]::SetEnvironmentVariable('PATH', $newPath, [EnvironmentVariableTarget]::Machine); \ + Write-Host 'Complete.' +# doing this first to share cache across versions more aggressively + +ENV PYTHON_VERSION 3.16.0a1 +ENV PYTHON_SHA256 d70c353262f6a2ccd50cd5aa9273e22bc217a75d9ce1855b07b83fc2e6296454 + +RUN $url = 'https://www.python.org/ftp/python/3.16.0/python-3.16.0a1-amd64.zip'; \ + Write-Host ('Downloading {0} ...' -f $url); \ + [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; \ + Invoke-WebRequest -Uri $url -OutFile 'python.zip'; \ + \ + Write-Host ('Verifying sha256 ({0}) ...' -f $env:PYTHON_SHA256); \ + if ((Get-FileHash python.zip -Algorithm sha256).Hash -ne $env:PYTHON_SHA256) { \ + Write-Host 'FAILED!'; \ + exit 1; \ + }; \ + \ + Write-Host 'Expanding ...'; \ + Expand-Archive python.zip -DestinationPath C:\Python\; \ + \ + Write-Host 'Removing ...'; \ + Remove-Item python.zip -Force; \ + \ + Write-Host 'Verifying install ("python --version") ...'; \ + python --version; \ + \ + $env:PYTHONDONTWRITEBYTECODE = '1'; \ + \ + Write-Host 'Re-Installing pip ...'; \ + # remove zip-provided pip so that we can reinstall and get the exe in c:/python/Scripts + Remove-Item -Recurse C:/python/Lib/site-packages/pip; \ + Remove-Item -Recurse C:/python/Lib/site-packages/pip-*; \ + # install pip again + python -m ensurepip --default-pip; \ + \ + Write-Host 'Verifying pip install ...'; \ + pip --version; \ + \ + Write-Host 'Complete.' + +CMD ["python"] diff --git a/Dockerfile-windows.template b/Dockerfile-windows.template index add70eac7..fd8a5f3e7 100644 --- a/Dockerfile-windows.template +++ b/Dockerfile-windows.template @@ -1,28 +1,54 @@ +{{ + def extension: + .checksums.windows.url | sub(".*[.]"; "") + ; + def is_windows_zip: + extension == "zip" +-}} FROM mcr.microsoft.com/windows/{{ env.windowsVariant }}:{{ env.windowsRelease }} SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"] # https://github.com/docker-library/python/pull/557 ENV PYTHONIOENCODING UTF-8 +{{ + # installer sets path for older python, but needs to be set for the zip download + if is_windows_zip then ( +-}} + +# PATH isn't actually set in the Docker image, so we have to set it from within the container +RUN $newPath = ('C:\Python;C:\Python\Scripts;{0}' -f $env:PATH); \ + Write-Host ('Updating PATH: {0}' -f $newPath); \ + [Environment]::SetEnvironmentVariable('PATH', $newPath, [EnvironmentVariableTarget]::Machine); \ + Write-Host 'Complete.' +# doing this first to share cache across versions more aggressively +{{ ) else "" end -}} ENV PYTHON_VERSION {{ .version }} {{ if .checksums.windows.sha256 then ( -}} ENV PYTHON_SHA256 {{ .checksums.windows.sha256 }} {{ ) else "" end -}} -RUN $url = ('https://www.python.org/ftp/python/{0}/python-{1}-amd64.exe' -f ($env:PYTHON_VERSION -replace '[a-z]+[0-9]*$', ''), $env:PYTHON_VERSION); \ +RUN $url = '{{ .checksums.windows.url }}'; \ Write-Host ('Downloading {0} ...' -f $url); \ [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; \ - Invoke-WebRequest -Uri $url -OutFile 'python.exe'; \ + Invoke-WebRequest -Uri $url -OutFile 'python.{{ extension }}'; \ {{ if .checksums.windows.sha256 then ( -}} \ Write-Host ('Verifying sha256 ({0}) ...' -f $env:PYTHON_SHA256); \ - if ((Get-FileHash python.exe -Algorithm sha256).Hash -ne $env:PYTHON_SHA256) { \ + if ((Get-FileHash python.{{ extension }} -Algorithm sha256).Hash -ne $env:PYTHON_SHA256) { \ Write-Host 'FAILED!'; \ exit 1; \ }; \ {{ ) else "" end -}} \ +{{ if is_windows_zip then ( -}} + Write-Host 'Expanding ...'; \ + Expand-Archive python.zip -DestinationPath C:\Python\; \ + \ + Write-Host 'Removing ...'; \ + Remove-Item python.zip -Force; \ +{{ ) else ( -}} Write-Host 'Installing ...'; \ # https://docs.python.org/3/using/windows.html#installing-without-ui $exitCode = (Start-Process python.exe -Wait -NoNewWindow -PassThru \ @@ -46,15 +72,25 @@ RUN $url = ('https://www.python.org/ftp/python/{0}/python-{1}-amd64.exe' -f ($en # the installer updated PATH, so we should refresh our local value $env:PATH = [Environment]::GetEnvironmentVariable('PATH', [EnvironmentVariableTarget]::Machine); \ \ - Write-Host 'Verifying install ...'; \ - Write-Host ' python --version'; python --version; \ - \ Write-Host 'Removing ...'; \ Remove-Item python.exe -Force; \ Remove-Item $env:TEMP/Python*.log -Force; \ +{{ ) end -}} + \ + Write-Host 'Verifying install ("python --version") ...'; \ + python --version; \ \ $env:PYTHONDONTWRITEBYTECODE = '1'; \ \ +{{ if is_windows_zip then ( -}} + Write-Host 'Re-Installing pip ...'; \ + # remove zip-provided pip so that we can reinstall and get the exe in c:/python/Scripts + Remove-Item -Recurse C:/python/Lib/site-packages/pip; \ + Remove-Item -Recurse C:/python/Lib/site-packages/pip-*; \ + # install pip again + python -m ensurepip --default-pip; \ + \ +{{ ) else "" end -}} Write-Host 'Verifying pip install ...'; \ pip --version; \ \ diff --git a/versions.json b/versions.json index 7fb41316f..117b703d2 100644 --- a/versions.json +++ b/versions.json @@ -40,7 +40,8 @@ "sha256": "6020bd10aff3bf4821be16f088ebb1591beb7b811dcd8fab1da8f7c22a7b27e7" }, "windows": { - "sha256": "5da012101ba2e17113a9a1cd901e9ce1441086f2b7ecb5de06ec94163899a190" + "sha256": "5da012101ba2e17113a9a1cd901e9ce1441086f2b7ecb5de06ec94163899a190", + "url": "https://www.python.org/ftp/python/3.13.17/python-3.13.17-amd64.exe" } }, "variants": [ @@ -61,7 +62,8 @@ "sha256": "e02d9ac21cebda6e46435369744a92c65cc7cd8669697694122cf97ffacd1e53" }, "windows": { - "sha256": "a247a0b612244a803f507b39fb7121e3602e4160d59c3b99d98e735289c53394" + "sha256": "a247a0b612244a803f507b39fb7121e3602e4160d59c3b99d98e735289c53394", + "url": "https://www.python.org/ftp/python/3.14.9/python-3.14.9-amd64.exe" } }, "variants": [ @@ -82,7 +84,8 @@ "sha256": "673ae7232d84c894729882c8257d300ef2d26523911bfd3917ec8ce7f526f99b" }, "windows": { - "sha256": "8b23839c6b2f3076fdff44c78d219a5393c7205f666cd95bd0c9a562bf8ea5db" + "sha256": "8b23839c6b2f3076fdff44c78d219a5393c7205f666cd95bd0c9a562bf8ea5db", + "url": "https://www.python.org/ftp/python/3.15.1/python-3.15.1-amd64.exe" } }, "variants": [ @@ -101,13 +104,19 @@ "checksums": { "source": { "sha256": "dcaa9029436b723e33412c68ca17f0130be73058e47a3a7c049cb8cdf6034ee9" + }, + "windows": { + "sha256": "d70c353262f6a2ccd50cd5aa9273e22bc217a75d9ce1855b07b83fc2e6296454", + "url": "https://www.python.org/ftp/python/3.16.0/python-3.16.0a1-amd64.zip" } }, "variants": [ "trixie", "slim-trixie", "alpine3.24", - "alpine3.23" + "alpine3.23", + "windows/windowsservercore-ltsc2025", + "windows/windowsservercore-ltsc2022" ], "version": "3.16.0a1" } diff --git a/versions.sh b/versions.sh index 781a5e544..386549441 100755 --- a/versions.sh +++ b/versions.sh @@ -21,7 +21,16 @@ check_file() { local filename="Python-$fullVersion.tar.xz" if [ "$type" = 'windows' ]; then - filename="python-$fullVersion-amd64.exe" + # > phase out the traditional installer by Python 3.16 + # https://peps.python.org/pep-0773/#replacing-other-installers + case "${fullVersion}" in + 3.11.*|3.12.*|3.13.*|3.14.*|3.15.*) + filename="python-$fullVersion-amd64.exe" + ;; + *) + filename="python-$fullVersion-amd64.zip" + ;; + esac fi local url="https://www.python.org/ftp/python/$dirVersion/$filename" @@ -36,11 +45,11 @@ check_file() { ' )" && [ -n "$sigstore" ]; then sigstore="$(base64 -d <<<"$sigstore" | hexdump -ve '/1 "%02x"')" - checksums["$fullVersion"]="$(jq <<<"${checksums["$fullVersion"]:-null}" --arg type "$type" --arg sha256 "$sigstore" '.[$type].sha256 = $sha256')" + checksums["$fullVersion"]="$(jq <<<"${checksums["$fullVersion"]:-null}" --arg type "$type" --arg sha256 "$sigstore" --arg url "$url" '.[$type].sha256 = $sha256 | if $type == "windows" then .[$type].url = $url else . end')" return 0 fi - # TODO is this even necessary/useful? the sigstore-based version above is *much* faster, supports all current versions (not just 3.12+ like this), *and* should be more reliable 🤔 + # while the sigstore-based version above is *much* faster and supports all current versions (not just 3.12+ like this), the zips for 3.16+ don't have a '.sigstore' file local sbom if sbom="$( wget -qO- -o/dev/null "$url.spdx.json" \ @@ -66,7 +75,7 @@ check_file() { end ' )" && [ -n "sbom" ]; then - checksums["$fullVersion"]="$(jq <<<"${checksums["$fullVersion"]:-null}" --arg type "$type" --argjson sums "$sbom" '.[$type] += $sums')" + checksums["$fullVersion"]="$(jq <<<"${checksums["$fullVersion"]:-null}" --arg type "$type" --argjson sums "$sbom" --arg url "$url" '.[$type] += $sums | if $type == "windows" then .[$type].url = $url else . end')" return 0 fi