Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
245 changes: 245 additions & 0 deletions .github/workflows/github_workflows_build-2026_03.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,245 @@
name: Build WinPython for 2026-02 Cycle

on:
workflow_dispatch:
inputs:
python_versionf:
description: 'Python version to build (3.13, 3.14, 3.14F or 3.15)'
required: true
default: '3.14'
type: choice
options:
- '3.13'
- '3.14'
- '3.14F'
- '3.15'
- '3.15F'

env:
# === Global Configuration ===
WINPYARCH: "64"
my_cycle: "winpython/portable/cycle_2026_03"
my_release_level: "b0"
dotwheelhouse: "dotpython\\wheelhouse\\included.wheels"
pandoc_source: "https://github.com/jgm/pandoc/releases/download/3.1.9/pandoc-3.1.9-windows-x86_64.zip"
pandoc_sha256: "11eb6dbe5286c9e5edb0cca4412e7d99ec6578ec04158b0b7fe11f7fd96688e5"

jobs:
build-winpython:
runs-on: windows-latest
strategy:
fail-fast: true
matrix:
flavor:
- name: "dot"
formats: { zip: true, 7z: false, exe: true }
PANDOC: "0"
WINPYARCHDET: "64"
- name: "slim"
formats: { zip: false, 7z: true, exe: true }
PANDOC: "1"
WINPYARCHDET: "64"
- name: "whl"
formats: { zip: false, 7z: true, exe: false }
PANDOC: "0"
WINPYARCHDET: "64"
- name: "dotf"
formats: { zip: true, 7z: false, exe: true }
PANDOC: "0"
WINPYARCHDET: "64F"
- name: "slimf"
formats: { zip: false, 7z: true, exe: true }
PANDOC: "1"
WINPYARCHDET: "64F"

env:
PYTHON_VERSIONF: ${{ github.event.inputs.python_versionf }}
WINPYFLAVOR: ${{ matrix.flavor.name }}
PANDOC: ${{ matrix.flavor.PANDOC }}
WINPYARCHDET: ${{ matrix.flavor.WINPYARCHDET }}

steps:
- name: Checkout repository
uses: actions/checkout@v6

- name: Set Python version configuration
id: python_config
shell: pwsh
run: |
switch ($env:PYTHON_VERSIONF) {
'3.13' {
Add-Content -Path $env:GITHUB_OUTPUT -Value 'ver2=3.13.13.1'
Add-Content -Path $env:GITHUB_OUTPUT -Value 'src=https://github.com/astral-sh/python-build-standalone/releases/download/20260508/cpython-3.13.13+20260508-x86_64-pc-windows-msvc-install_only_stripped.tar.gz'
Add-Content -Path $env:GITHUB_OUTPUT -Value 'sha=08eaecdf56b0929f4fc07d0d6b21e96df768de80d42b87d339c932a4bd12a9a1'
}
'3.14' {
Add-Content -Path $env:GITHUB_OUTPUT -Value 'ver2=3.14.5.1'
Add-Content -Path $env:GITHUB_OUTPUT -Value 'src=https://github.com/astral-sh/python-build-standalone/releases/download/20260510/cpython-3.14.5+20260510-x86_64-pc-windows-msvc-install_only_stripped.tar.gz'
Add-Content -Path $env:GITHUB_OUTPUT -Value 'sha=4d26ade49e9571ccb3bd1a88cfc72c52b11a9a9f6e204a57f38592aed137566a'
}
'3.14F' {
Add-Content -Path $env:GITHUB_OUTPUT -Value 'ver2=3.14.5.1'
Add-Content -Path $env:GITHUB_OUTPUT -Value 'src=https://github.com/astral-sh/python-build-standalone/releases/download/20260510/cpython-3.14.5+20260510-x86_64-pc-windows-msvc-freethreaded-install_only_stripped.tar.gz'
Add-Content -Path $env:GITHUB_OUTPUT -Value 'sha=780df413efe4992c751bff3f84e63c54ccffa11fd26487378ff9de459375e409'
}
'3.15' {
Add-Content -Path $env:GITHUB_OUTPUT -Value 'ver2=3.15.0.3'
Add-Content -Path $env:GITHUB_OUTPUT -Value 'src=https://github.com/astral-sh/python-build-standalone/releases/download/20260508/cpython-3.15.0b1+20260508-x86_64-pc-windows-msvc-install_only_stripped.tar.gz'
Add-Content -Path $env:GITHUB_OUTPUT -Value 'sha=8a1184312b5e7469d6a937e3d7478ea5a11d65a8a8a2a4cad8cbb851c13b111c'
}
'3.15F' {
Add-Content -Path $env:GITHUB_OUTPUT -Value 'ver2=3.15.0.3'
Add-Content -Path $env:GITHUB_OUTPUT -Value 'src=https://github.com/astral-sh/python-build-standalone/releases/download/20260508/cpython-3.15.0b1+20260508-x86_64-pc-windows-msvc-freethreaded-install_only_stripped.tar.gz'
Add-Content -Path $env:GITHUB_OUTPUT -Value 'sha=5c139ad3b99ea0ae08cf79d32f9731da379f7259fb4353746b9cc14bd0fc184f'
}
}

- name: Set static and matrix variables based on selected Python version
shell: pwsh
env:
PYTHON_VERSIONF: ${{ env.PYTHON_VERSIONF }}
WINPYARCHDET: ${{ env.WINPYARCHDET }}
WINPYVER2: ${{ steps.python_config.outputs.ver2 }}
my_cycle: ${{ env.my_cycle }}
my_release_level: ${{ env.my_release_level }}
FLAVOR_NAME: ${{ matrix.flavor.name }}
python_source: ${{ steps.python_config.outputs.src }}
run: |
# Normalize PYTHON_VERSION by removing trailing 'F' if present
$PYTHON_VERSION = $env:PYTHON_VERSIONF -replace 'F$',''
Add-Content -Path $env:GITHUB_ENV -Value "PYTHON_VERSION=$PYTHON_VERSION"

# Detect architecture (64 or 64F)
$detected_arch = if ($env:PYTHON_VERSIONF -like '*F') { '64F' } else { '64' }

$WINPYVER2 = $env:WINPYVER2
$BUILD_LOCATION = "WPy64-" + ($WINPYVER2 -replace '[.]', "")
Add-Content -Path $env:GITHUB_ENV -Value "build_location=$BUILD_LOCATION"

# check consistency of parametrizing:
$python_version=([version]$WINPYVER2).ToString(3)
if ($env:python_source.Contains($python_version)) {
Write-Host "Success: Found '$python_version' in $env:python_source"
} else {
Write-Error "Error: '$python_version' not found in $env:python_source !"
exit 1
}

$WINPYREQUIREMENTS = ''
$WINPYREQUIREMENTSwhl = ''

# 2. Generate requirement files expected names dynamically
$V_TAG = $env:WINPYVER2 -replace '\.', '_'
$testreq = "$($env:my_cycle)/requir.64-$($V_TAG)$($env:FLAVOR_NAME)$($env:my_release_level).txt"
$testwhl = "$($env:my_cycle)/requir.64-$($V_TAG)$($env:FLAVOR_NAME)$($env:my_release_level)_wheels.txt"

Write-Host "Checking for requirements files: $testreq and $testwhl (expected arch $detected_arch)"

if ($env:WINPYARCHDET -eq $detected_arch -and (Test-Path $testreq)) {
$WINPYREQUIREMENTS = $testreq
Write-Host "Found $WINPYREQUIREMENTS"
if (Test-Path $testwhl) {
$WINPYREQUIREMENTSwhl = $testwhl
Write-Host "Found also $WINPYREQUIREMENTSwhl"
}
}

Add-Content -Path $env:GITHUB_ENV -Value "WINPYREQUIREMENTS=$WINPYREQUIREMENTS"
Add-Content -Path $env:GITHUB_ENV -Value "WINPYREQUIREMENTSwhl=$WINPYREQUIREMENTSwhl"

$WINPYLOCKFILE = ''
$WINPYLOCKFILEwhl = ''

# 2. Generate pylock files expected names dynamically
$V_TAG = $env:WINPYVER2 -replace '\.', '_'
$testreq = "$($env:my_cycle)/pylock.64-$($V_TAG)$($env:FLAVOR_NAME)$($env:my_release_level).toml"
$testwhl = "$($env:my_cycle)/pylock.64-$($V_TAG)$($env:FLAVOR_NAME)$($env:my_release_level)_wheels.toml"

Write-Host "Checking for pylock files: $testreq and $testwhl (expected arch $detected_arch)"

if ($env:WINPYARCHDET -eq $detected_arch -and (Test-Path $testreq)) {
$WINPYLOCKFILE = $testreq
Write-Host "Found $WINPYLOCKFILE"
if (Test-Path $testwhl) {
$WINPYLOCKFILEwhl = $testwhl
Write-Host "Found also $WINPYLOCKFILEwhl"
}
}

Add-Content -Path $env:GITHUB_ENV -Value "WINPYLOCKFILE=$WINPYLOCKFILE"
Add-Content -Path $env:GITHUB_ENV -Value "WINPYLOCKFILEwhl=$WINPYLOCKFILEwhl"

$ARTIFACT_NAME = "publish_${PYTHON_VERSION}$($env:FLAVOR_NAME)"
Add-Content -Path $env:GITHUB_ENV -Value "ARTIFACT_NAME=$ARTIFACT_NAME"

$destwheelhouse = "$BUILD_LOCATION\wheelhouse\included.wheels"
Add-Content -Path $env:GITHUB_ENV -Value "destwheelhouse=$destwheelhouse"

$WINPYVER = "${WINPYVER2}$($env:FLAVOR_NAME)$($env:my_release_level)"
Add-Content -Path $env:GITHUB_ENV -Value "WINPYVER=$WINPYVER"

# Store WINPYVER2 in env for later steps
Add-Content -Path $env:GITHUB_ENV -Value "WINPYVER2=$WINPYVER2"

- name: Download, verify and extract python standalone
if: env.WINPYLOCKFILE != ''
uses: ./.github/actions/python-setup
with:
python_source: ${{ steps.python_config.outputs.src }}
python_sha256: ${{ steps.python_config.outputs.sha }}
build_location: ${{ env.build_location }}

- name: Download, checking hash and integrating pandoc binary
if: env.WINPYLOCKFILE != '' && env.PANDOC == '1'
uses: ./.github/actions/pandoc-setup
with:
pandoc_source: ${{ env.pandoc_source }}
pandoc_sha256: ${{ env.pandoc_sha256 }}
build_location: ${{ env.build_location }}

- name: Upgrade pip and patch launchers
if: env.WINPYLOCKFILE != ''
shell: pwsh
run: |
& "$env:build_location\python\python.exe" -m pip install --upgrade --force-reinstall pip --no-warn-script-location
& "$env:build_location\python\python.exe" -c "from wppm import wppm;dist=wppm.Distribution();dist.patch_standard_packages('pip', to_movable=True)"

- name: Download all requirements
if: ${{ env.WINPYLOCKFILE != '' }}
shell: pwsh
run: |
$py = "$env:build_location\python\python.exe"
& $py -m pip download --dest $env:dotwheelhouse --no-deps --require-hashes -r $env:WINPYLOCKFILE
if ($env:WINPYLOCKFILEwhl -ne '') {
& $py -m pip download --dest $env:destwheelhouse --no-deps --require-hashes -r $env:WINPYLOCKFILEwhl
}

- name: Install lockfile
if: env.WINPYLOCKFILE != ''
shell: pwsh
run: |
# & "$env:build_location\python\python.exe" -m pip install --no-deps --no-index --trusted-host=None --find-links=$env:dotwheelhouse --require-hashes -r $env:WINPYREQUIREMENTS --no-warn-script-location
& "$env:build_location\python\python.exe" -m pip install --no-deps --require-hashes -r $env:WINPYLOCKFILE --no-warn-script-location

- name: Generate Assets and Hashes
if: env.WINPYLOCKFILE != ''
uses: ./.github/actions/publish-winpython
with:
build_location: ${{ env.build_location }}
winpy_flavor: ${{ env.WINPYFLAVOR }}
winpy_arch: ${{ env.WINPYARCH }}
winpy_ver: ${{ env.WINPYVER }}
winpy_ver2: ${{ env.WINPYVER2 }}
dotwheelhouse: ${{ env.dotwheelhouse }}
winpy_requirements_whl: ${{ env.WINPYREQUIREMENTSwhl }}
format_zip: ${{ matrix.flavor.formats.zip }}
format_7z: ${{ matrix.flavor.formats['7z'] }}
format_exe: ${{ matrix.flavor.formats.exe }}

- name: Upload artifacts
if: env.WINPYLOCKFILE != ''
uses: actions/upload-artifact@v6
with:
name: ${{ env.ARTIFACT_NAME }}
path: publish_output
retention-days: 66 # keeps artifact for 66 days
4 changes: 4 additions & 0 deletions winpython/build_winpython.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,10 @@ def generate_lockfiles(target_python: Path, winpydirbase: Path, constraints: str
raise os.error
else:
print ("💖💖💖 match 💖💖💖 ok ",winpydirbase.parent / f"requir.{file_postfix}{web}.txt", winpydirbase.parent / f"requir.{file_postfix}{local}.txt")
print ("💖 housekeeping, removing local files 💖 ", winpydirbase.parent / f"requir.{file_postfix}{local}.txt")
os.remove (winpydirbase.parent / f"requir.{file_postfix}{local}.txt")
os.remove (winpydirbase.parent / f"pylock.{file_postfix}{local}.toml")
os.remove (winpydirbase.parent / f"requirement_temp.txt")

# --- Main Logic ---
def run_make_py(build_python, winpydirbase, args, winpyver, winpyver2):
Expand Down
101 changes: 101 additions & 0 deletions winpython/portable/cycle_2026_03/pylock.64-3_13_13_1dotb0.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
lock-version = "1.0"
created-by = "pip"

[[packages]]
name = "build"
version = "1.4.2"

[[packages.wheels]]
name = "build-1.4.2-py3-none-any.whl"
url = "https://files.pythonhosted.org/packages/4a/57/3b7d4dd193ade4641c865bc2b93aeeb71162e81fc348b8dad020215601ed/build-1.4.2-py3-none-any.whl"

[packages.wheels.hashes]
sha256 = "7a4d8651ea877cb2a89458b1b198f2e69f536c95e89129dbf5d448045d60db88"

[[packages]]
name = "colorama"
version = "0.4.6"

[[packages.wheels]]
name = "colorama-0.4.6-py2.py3-none-any.whl"
url = "https://files.pythonhosted.org/packages/d1/d6/3965ed04c63042e047cb6a3e6ed1a63a35087b6a609aa3a15ed8ac56c221/colorama-0.4.6-py2.py3-none-any.whl"

[packages.wheels.hashes]
sha256 = "4f1d9991f5acc0ca119f9d443620b77f9d6b33703e51011c16baf57afb285fc6"

[[packages]]
name = "packaging"
version = "26.2"

[[packages.wheels]]
name = "packaging-26.2-py3-none-any.whl"
url = "https://files.pythonhosted.org/packages/df/b2/87e62e8c3e2f4b32e5fe99e0b86d576da1312593b39f47d8ceef365e95ed/packaging-26.2-py3-none-any.whl"

[packages.wheels.hashes]
sha256 = "5fc45236b9446107ff2415ce77c807cee2862cb6fac22b8a73826d0693b0980e"

[[packages]]
name = "pyproject-hooks"
version = "1.2.0"

[[packages.wheels]]
name = "pyproject_hooks-1.2.0-py3-none-any.whl"
url = "https://files.pythonhosted.org/packages/bd/24/12818598c362d7f300f18e74db45963dbcb85150324092410c8b49405e42/pyproject_hooks-1.2.0-py3-none-any.whl"

[packages.wheels.hashes]
sha256 = "9e5c6bfa8dcc30091c74b0cf803c81fdd29d94f01992a7707bc97babb1141913"

[[packages]]
name = "setuptools"
version = "82.0.1"

[[packages.wheels]]
name = "setuptools-82.0.1-py3-none-any.whl"
url = "https://files.pythonhosted.org/packages/9d/76/f789f7a86709c6b087c5a2f52f911838cad707cc613162401badc665acfe/setuptools-82.0.1-py3-none-any.whl"

[packages.wheels.hashes]
sha256 = "a59e362652f08dcd477c78bb6e7bd9d80a7995bc73ce773050228a348ce2e5bb"

[[packages]]
name = "sqlite-bro"
version = "0.13.1"

[[packages.wheels]]
name = "sqlite_bro-0.13.1-py3-none-any.whl"
url = "https://files.pythonhosted.org/packages/2a/b3/81b91f5b26fff329c59dbf826a87637bd51d1903120427912322f86e7d33/sqlite_bro-0.13.1-py3-none-any.whl"

[packages.wheels.hashes]
sha256 = "c26033b0af133049ca578b5fd30b2372f002e7ff934b39774aa4d2da7638c23d"

[[packages]]
name = "sv-ttk"
version = "2.6.0"

[[packages.wheels]]
name = "sv_ttk-2.6.0-py3-none-any.whl"
url = "https://files.pythonhosted.org/packages/0f/3d/be0abc3202e90f282ad465f4e7c6e41bc8dce810ce5d1611566a1e7dfba8/sv_ttk-2.6.0-py3-none-any.whl"

[packages.wheels.hashes]
sha256 = "4319c52edf2e14732fe84bdc9788e26f9e9a1ad79451ec0f89f0120ffc8105d9"

[[packages]]
name = "wheel"
version = "0.47.0"

[[packages.wheels]]
name = "wheel-0.47.0-py3-none-any.whl"
url = "https://files.pythonhosted.org/packages/87/1b/9e33c09813d65e248f7f773119148a612516a4bea93e9c6f545f78455b7c/wheel-0.47.0-py3-none-any.whl"

[packages.wheels.hashes]
sha256 = "212281cab4dff978f6cedd499cd893e1f620791ca6ff7107cf270781e587eced"

[[packages]]
name = "wppm"
version = "17.4.20260517"

[[packages.wheels]]
name = "wppm-17.4.20260517-py3-none-any.whl"
url = "https://files.pythonhosted.org/packages/3f/b2/8c2ef911b9d98ce05052b159cc29276cd33bd6c39d2d2c2dd7f2a6a2586a/wppm-17.4.20260517-py3-none-any.whl"

[packages.wheels.hashes]
sha256 = "7e5a934c099b8e5bdb9710d2ceb5387695b813af5317b08e4cff1e521b682a6e"
Loading