Skip to content

Commit 1a70240

Browse files
committed
less code, more parameters
1 parent 3695294 commit 1a70240

1 file changed

Lines changed: 41 additions & 41 deletions

File tree

.github/workflows/github_workflows_build-2026_01.yml

Lines changed: 41 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,15 @@ name: Build WinPython for 2026-01 Cycle
33
on:
44
workflow_dispatch:
55
inputs:
6-
python_version:
7-
description: 'Python version to build (3.13, 3.14 or 3.15)'
6+
python_versionf:
7+
description: 'Python version to build (3.13, 3.14, 3.14F or 3.15)'
88
required: true
99
default: '3.14'
1010
type: choice
1111
options:
1212
- '3.13'
1313
- '3.14'
14+
- '3.14F'
1415
- '3.15'
1516
env:
1617
# === Global Configuration ===
@@ -77,12 +78,43 @@ jobs:
7778
formats: { zip: false, 7z: true, exe: true }
7879
PANDOC: "1"
7980
WINPYARCHDET: "64F"
81+
# use the workflow input as the python_version matrix (single value)
82+
python_versionf: [ ${{ github.event.inputs.python_versionf }} ]
83+
include:
84+
# Configuration for 3.13
85+
- python_versionf: "3.13"
86+
ver2: "3.13.11.1"
87+
v_tag: "3_13_11_"
88+
src: "https://github.com/astral-sh/python-build-standalone/releases/download/20251205/cpython-3.13.11+20251205-x86_64-pc-windows-msvc-install_only_stripped.tar.gz"
89+
sha: "d8a2b5e05ef71fc71f048a6f409d69b940bc5d33da8b112611cfba68fc5b86c3"
90+
# Configuration for 3.14 (Standard)
91+
- python_versionf: "3.14"
92+
ver2: "3.14.2.1"
93+
v_tag: "3_14_2_"
94+
src: "https://github.com/astral-sh/python-build-standalone/releases/download/20251205/cpython-3.14.2+20251205-x86_64-pc-windows-msvc-install_only_stripped.tar.gz"
95+
sha: "512744d8a86dc6042a712035ada5d87c5e2ce4218f5dbdc74d039cee46e76fb4"
96+
# Configuration for 3.14 (Free-threading override of flavor)
97+
- python_versionf: "3.14F"
98+
ver2: "3.14.2.1"
99+
v_tag: "3_14_2_"
100+
src: "https://github.com/astral-sh/python-build-standalone/releases/download/20251205/cpython-3.14.2+20251205-x86_64-pc-windows-msvc-freethreaded+pgo-full.tar.zst"
101+
sha: "536cf813857ea566fcfae18a1b7dbcd185385f1dc1f04d5a0951bad235c8fc61"
102+
# Configuration for 3.15
103+
- python_versionf: "3.15"
104+
ver2: "3.15.0.1"
105+
v_tag: "3_15_0_"
106+
src: "https://github.com/astral-sh/python-build-standalone/releases/download/20251217/cpython-3.15.0a3+20251217-x86_64-pc-windows-msvc-install_only_stripped.tar.gz"
107+
sha: "4cac37170050bb402eaabad84e7ceb4679ec8ffaf43fbea71d62651ca761dcd7"
80108

81109
env:
82-
PYTHON_VERSION: ${{ github.event.inputs.python_version }}
110+
PYTHON_VERSIONF: ${{ github.event.inputs.python_versionf }}
111+
PYTHON_VERSION: ${{ replace(matrix.python_versionf, 'F', '') }}
112+
detected_arch: ${{ contains(matrix.python_versionf, 'F') && '64F' || '64' }}
83113
WINPYFLAVOR: ${{ matrix.flavor.name }}
84114
PANDOC: ${{ matrix.flavor.PANDOC }}
85115
WINPYARCHDET: ${{ matrix.flavor.WINPYARCHDET }}
116+
WINPYVER2: ${{ matrix.ver2 }}
117+
build_location: WPy64-${{ replace(matrix.ver2, '.', '') }}
86118

87119
steps:
88120
- name: Checkout repository
@@ -93,6 +125,8 @@ jobs:
93125
run: |
94126
PYTHON_VERSION="${{ env.PYTHON_VERSION }}"
95127
WINPYARCHDET="${{ env.WINPYARCHDET }}"
128+
detected_arch="${{ env.detected_arch }}"
129+
WINPYVER2="${{ env.WINPYVER2 }}"
96130
97131
WINPYVERSION=${PYTHON_VERSION//./}
98132
echo "WINPYVERSION=$WINPYVERSION" >> $GITHUB_ENV
@@ -101,59 +135,25 @@ jobs:
101135
if [ "$PYTHON_VERSION" = "3.13" ]; then
102136
echo "WINPYREQUIREMENTS=${{ matrix.flavor.REQUIREMENTS_313 }}" >> $GITHUB_ENV
103137
echo "WINPYREQUIREMENTSwhl=${{ matrix.flavor.REQUIREMENTS_WHL_313 }}" >> $GITHUB_ENV
104-
WINPYVER2="3.13.11.1"
105-
elif [ "$PYTHON_VERSION" = "3.14" ]; then
138+
elif [ "$PYTHON_VERSION" = "3.14" ] && [ "$WINPYARCHDET" = "$detected_arch" ]; then
106139
echo "WINPYREQUIREMENTS=${{ matrix.flavor.REQUIREMENTS_314 }}" >> $GITHUB_ENV
107140
echo "WINPYREQUIREMENTSwhl=${{ matrix.flavor.REQUIREMENTS_WHL_314 }}" >> $GITHUB_ENV
108-
WINPYVER2="3.14.2.1"
109141
elif [ "$PYTHON_VERSION" = "3.15" ]; then
110142
echo "WINPYREQUIREMENTS=${{ matrix.flavor.REQUIREMENTS_315 }}" >> $GITHUB_ENV
111143
echo "WINPYREQUIREMENTSwhl=${{ matrix.flavor.REQUIREMENTS_WHL_315 }}" >> $GITHUB_ENV
112-
WINPYVER2="3.15.0.1"
113144
fi
114145
115-
#direct inference
116-
CLEAN_VER=${WINPYVER2//./}
117-
BUILD_LOCATION="WPy64-$CLEAN_VER"
118-
119146
# write common flavor env vars
120-
echo "WINPYVER2=$WINPYVER2" >> $GITHUB_ENV
121147
echo "ARTIFACT_NAME=publish_${PYTHON_VERSION}${{ matrix.flavor.name }}" >> $GITHUB_ENV
122-
echo "build_location=$BUILD_LOCATION" >> $GITHUB_ENV
123-
echo "destwheelhouse=${BUILD_LOCATION}\\wheelhouse\\included.wheels" >> $GITHUB_ENV
148+
echo "destwheelhouse=${{ env.build_location }}\\wheelhouse\\included.wheels" >> $GITHUB_ENV
124149
echo "WINPYVER=${WINPYVER2}${{ matrix.flavor.name }}${{ env.my_release_level }}" >> $GITHUB_ENV
125150
126-
# Centralized mapping of python binaries and SHAs by version and arch.
127-
# 3.13 x64 (GIL)
128-
if [ "$PYTHON_VERSION" = "3.13" ] && [ "$WINPYARCHDET" = "64" ]; then
129-
echo "python_source=https://github.com/astral-sh/python-build-standalone/releases/download/20251205/cpython-3.13.11+20251205-x86_64-pc-windows-msvc-install_only_stripped.tar.gz" >> $GITHUB_ENV
130-
echo "python_sha256=d8a2b5e05ef71fc71f048a6f409d69b940bc5d33da8b112611cfba68fc5b86c3" >> $GITHUB_ENV
131-
fi
132-
133-
# 3.14 x64 (GIL)
134-
if [ "$PYTHON_VERSION" = "3.14" ] && [ "$WINPYARCHDET" = "64" ]; then
135-
echo "python_source=https://github.com/astral-sh/python-build-standalone/releases/download/20251205/cpython-3.14.2+20251205-x86_64-pc-windows-msvc-install_only_stripped.tar.gz" >> $GITHUB_ENV
136-
echo "python_sha256=512744d8a86dc6042a712035ada5d87c5e2ce4218f5dbdc74d039cee46e76fb4" >> $GITHUB_ENV
137-
fi
138-
139-
# 3.14 X64 (free-threading)
140-
if [ "$PYTHON_VERSION" = "3.14" ] && [ "$WINPYARCHDET" = "64F" ]; then
141-
echo "python_source=https://github.com/astral-sh/python-build-standalone/releases/download/20251205/cpython-3.14.2+20251205-x86_64-pc-windows-msvc-freethreaded+pgo-full.tar.zst" >> $GITHUB_ENV
142-
echo "python_sha256=536cf813857ea566fcfae18a1b7dbcd185385f1dc1f04d5a0951bad235c8fc61" >> $GITHUB_ENV
143-
fi
144-
145-
# 3.15 X64 (GIL)
146-
if [ "$PYTHON_VERSION" = "3.15" ] && [ "$WINPYARCHDET" = "64" ]; then
147-
echo "python_source=https://github.com/astral-sh/python-build-standalone/releases/download/20251217/cpython-3.15.0a3+20251217-x86_64-pc-windows-msvc-install_only_stripped.tar.gz" >> $GITHUB_ENV
148-
echo "python_sha256=4cac37170050bb402eaabad84e7ceb4679ec8ffaf43fbea71d62651ca761dcd7" >> $GITHUB_ENV
149-
fi
150-
151151
- name: Download, verify and extract python standalone
152152
if: env.WINPYREQUIREMENTS != ''
153153
uses: ./.github/actions/python-setup
154154
with:
155-
python_source: ${{ env.python_source }}
156-
python_sha256: ${{ env.python_sha256 }}
155+
python_source: ${{ matrix.src }}
156+
python_sha256: ${{ matrix.sha }}
157157
build_location: ${{ env.build_location }}
158158

159159
- name: Download, checking hash and integrating pandoc binary

0 commit comments

Comments
 (0)