@@ -6,6 +6,7 @@ name: Build WinPython for 2025-05 Cycle
66# 2025-08-25b: move up all parameters
77# 2025-09-07: one single workflow to reduce code duplication
88# 2025-11-30: centralize links in one place, add 3.15, classify as b4
9+ # 2025-11-30: reduce repetition of parameters
910
1011on :
1112workflow_dispatch :
3940SEVEN_Z :" 0"
4041EXE :" 1"
4142PANDOC :" 0"
42- ARTIFACT_NAME_313 :" publish_313dot"
43- ARTIFACT_NAME_314 :" publish_314dot"
44- ARTIFACT_NAME_315 :" publish_315dot"
4543WINPYARCH :" 64"
4644WINPYARCHDET :" 64"
4745my_release_level :" b4"
5654SEVEN_Z :" 1"
5755EXE :" 1"
5856PANDOC :" 1"
59- ARTIFACT_NAME_313 :" publish_313slim"
60- ARTIFACT_NAME_314 :" publish_314slim"
61- ARTIFACT_NAME_315 :" "
6257WINPYARCH :" 64"
6358WINPYARCHDET :" 64"
6459my_release_level :" b4"
7368SEVEN_Z :" 1"
7469EXE :" 0"
7570PANDOC :" 0"
76- ARTIFACT_NAME_313 :" publish_313whl"
77- ARTIFACT_NAME_314 :" publish_314whl"
78- ARTIFACT_NAME_315 :" "
7971WINPYARCH :" 64"
8072WINPYARCHDET :" 64"
8173my_release_level :" b4"
9082SEVEN_Z :" 0"
9183EXE :" 1"
9284PANDOC :" 0"
93- ARTIFACT_NAME_313 :" "
94- ARTIFACT_NAME_314 :" publish_314free"
95- ARTIFACT_NAME_315 :" "
9685WINPYARCH :" 64"
9786WINPYARCHDET :" 64F"
9887my_release_level :" b4"
10796SEVEN_Z :" 0"
10897EXE :" 1"
10998PANDOC :" 0"
110- ARTIFACT_NAME_313 :" "
111- ARTIFACT_NAME_314 :" publish_314slimf"
112- ARTIFACT_NAME_315 :" "
11399WINPYARCH :" 64"
114100WINPYARCHDET :" 64F"
115101my_release_level :" b4"
@@ -128,35 +114,38 @@ jobs:
128114
129115 # Populate generic per-flavor / per-version selections
130116 if [ "$PYTHON_VERSION" = "3.13" ]; then
131- echo "WINPYrequirements =${{ matrix.flavor.REQUIREMENTS_313 }}" >> $GITHUB_ENV
132- echo "WINPYrequirementswhl =${{ matrix.flavor.REQUIREMENTS_WHL_313 }}" >> $GITHUB_ENV
133- echo "ARTIFACT_NAME=${{ matrix.flavor.ARTIFACT_NAME_313 } }" >> $GITHUB_ENV
117+ echo "WINPYREQUIREMENTS =${{ matrix.flavor.REQUIREMENTS_313 }}" >> $GITHUB_ENV
118+ echo "WINPYREQUIREMENTSwhl =${{ matrix.flavor.REQUIREMENTS_WHL_313 }}" >> $GITHUB_ENV
119+ echo "ARTIFACT_NAME=publish_${PYTHON_VERSION}${FLAVOR }" >> $GITHUB_ENV
134120 echo "WINPYVERSION=313" >> $GITHUB_ENV
135- echo "WINPYVER2=3.13.8.0" >> $GITHUB_ENV
121+ WINPYVER2="3.13.8.0"
122+ echo "WINPYVER2=$WINPYVER2" >> $GITHUB_ENV
136123 BUILD_LOCATION="WPy64-31380"
137124 echo "build_location=$BUILD_LOCATION" >> $GITHUB_ENV
138125 echo "destwheelhouse=${BUILD_LOCATION}\\wheelhouse\\included.wheels" >> $GITHUB_ENV
139- echo "WINPYVER=${{ matrix.flavor.WINPYVER2_313 } }${{ matrix.flavor.name }}${{ matrix.flavor.my_release_level }}" >> $GITHUB_ENV
126+ echo "WINPYVER=${WINPYVER2 }${{ matrix.flavor.name }}${{ matrix.flavor.my_release_level }}" >> $GITHUB_ENV
140127 elif [ "$PYTHON_VERSION" = "3.14" ]; then
141- echo "WINPYrequirements =${{ matrix.flavor.REQUIREMENTS_314 }}" >> $GITHUB_ENV
142- echo "WINPYrequirementswhl =${{ matrix.flavor.REQUIREMENTS_WHL_314 }}" >> $GITHUB_ENV
143- echo "ARTIFACT_NAME=${{ matrix.flavor.ARTIFACT_NAME_314 } }" >> $GITHUB_ENV
128+ echo "WINPYREQUIREMENTS =${{ matrix.flavor.REQUIREMENTS_314 }}" >> $GITHUB_ENV
129+ echo "WINPYREQUIREMENTSwhl =${{ matrix.flavor.REQUIREMENTS_WHL_314 }}" >> $GITHUB_ENV
130+ echo "ARTIFACT_NAME=publish_${PYTHON_VERSION}${FLAVOR }" >> $GITHUB_ENV
144131 echo "WINPYVERSION=314" >> $GITHUB_ENV
145- echo "WINPYVER2=3.14.0.2" >> $GITHUB_ENV
132+ WINPYVER2="3.14.0.2"
133+ echo "WINPYVER2=$WINPYVER2" >> $GITHUB_ENV
146134 BUILD_LOCATION="WPy64-31380"
147135 echo "build_location=$BUILD_LOCATION" >> $GITHUB_ENV
148136 echo "destwheelhouse=${BUILD_LOCATION}\\wheelhouse\\included.wheels" >> $GITHUB_ENV
149- echo "WINPYVER=${{ matrix.flavor.WINPYVER2_314 } }${{ matrix.flavor.name }}${{ matrix.flavor.my_release_level }}" >> $GITHUB_ENV
137+ echo "WINPYVER=${WINPYVER2 }${{ matrix.flavor.name }}${{ matrix.flavor.my_release_level }}" >> $GITHUB_ENV
150138 elif [ "$PYTHON_VERSION" = "3.15" ]; then
151- echo "WINPYrequirements =${{ matrix.flavor.REQUIREMENTS_315 }}" >> $GITHUB_ENV
152- echo "WINPYrequirementswhl =${{ matrix.flavor.REQUIREMENTS_WHL_315 }}" >> $GITHUB_ENV
153- echo "ARTIFACT_NAME=${{ matrix.flavor.ARTIFACT_NAME_315 } }" >> $GITHUB_ENV
139+ echo "WINPYREQUIREMENTS =${{ matrix.flavor.REQUIREMENTS_315 }}" >> $GITHUB_ENV
140+ echo "WINPYREQUIREMENTSwhl =${{ matrix.flavor.REQUIREMENTS_WHL_315 }}" >> $GITHUB_ENV
141+ echo "ARTIFACT_NAME=publish_${PYTHON_VERSION}${FLAVOR }" >> $GITHUB_ENV
154142 echo "WINPYVERSION=315" >> $GITHUB_ENV
155- echo "WINPYVER2=3.15.0.0" >> $GITHUB_ENV
143+ WINPYVER2="3.15.0.0"
144+ echo "WINPYVER2=$WINPYVER2" >> $GITHUB_ENV
156145 BUILD_LOCATION="WPy64-31500"
157146 echo "build_location=$BUILD_LOCATION" >> $GITHUB_ENV
158147 echo "destwheelhouse=${BUILD_LOCATION}\\wheelhouse\\included.wheels" >> $GITHUB_ENV
159- echo "WINPYVER=${{ matrix.flavor.WINPYVER2_315 } }${{ matrix.flavor.name }}${{ matrix.flavor.my_release_level }}" >> $GITHUB_ENV
148+ echo "WINPYVER=${WINPYVER2 }${{ matrix.flavor.name }}${{ matrix.flavor.my_release_level }}" >> $GITHUB_ENV
160149 fi
161150
162151 # write common flavor env vars
@@ -203,14 +192,14 @@ jobs:
203192 fi
204193
205194 -name :See variables
206- if :env.ARTIFACT_NAME != ''
195+ if :env.WINPYREQUIREMENTS != ''
207196shell :pwsh
208197run :|
209198 Write-Output "PYTHON_VERSION is $env:PYTHON_VERSION"
210199 Write-Output "WINPYFLAVOR is $env:WINPYFLAVOR"
211200
212- Write-Output "WINPYrequirements is $env:WINPYrequirements "
213- Write-Output "WINPYrequirementswhl is $env:WINPYrequirementswhl "
201+ Write-Output "WINPYREQUIREMENTS is $env:WINPYREQUIREMENTS "
202+ Write-Output "WINPYREQUIREMENTSwhl is $env:WINPYREQUIREMENTSwhl "
214203 Write-Output "ARTIFACT_NAME is $env:ARTIFACT_NAME"
215204
216205 Write-Output "python_source is $env:python_source"
@@ -235,7 +224,7 @@ jobs:
235224 Write-Output "WINPYVER is $env:WINPYVER"
236225
237226 -name :Download python-3 standalone
238- if :env.ARTIFACT_NAME != ''
227+ if :env.WINPYREQUIREMENTS != ''
239228shell :pwsh
240229run :|
241230 Write-Output "python_source used is $env:python_source"
@@ -257,7 +246,7 @@ jobs:
257246 }
258247
259248 -name :Extract python-3-embed.tar.gz to dotpython
260- if :env.ARTIFACT_NAME != ''
249+ if :env.WINPYREQUIREMENTS != ''
261250shell :bash
262251run :|
263252 mkdir -p dotpythonpre
@@ -271,28 +260,28 @@ jobs:
271260 fi
272261
273262 -name :Copy launchers_final files to dotpython
274- if :env.ARTIFACT_NAME != ''
263+ if :env.WINPYREQUIREMENTS != ''
275264shell :bash
276265run :|
277266 cp -r winpython/portable/launchers_final/* dotpython/
278267 mkdir $env:dotwheelhouse
279268
280269 -name :List dotpython contents (for debugging)
281- if :env.ARTIFACT_NAME != ''
270+ if :env.WINPYREQUIREMENTS != ''
282271shell :pwsh
283272run :|
284273 Get-ChildItem dotpython
285274 Get-ChildItem dotpython\python
286275
287276 -name :Prepare WinPython target structure
288- if :env.ARTIFACT_NAME != ''
277+ if :env.WINPYREQUIREMENTS != ''
289278shell :pwsh
290279run :|
291280 New-Item -ItemType Directory -Path $env:build_location
292281 Get-ChildItem -Path dotpython -Force | Move-Item -Destination $env:build_location -Force
293282
294283 -name :Download and integrate pandoc binary
295- if :env.ARTIFACT_NAME != '' && env.PANDOC == '1'
284+ if :env.WINPYREQUIREMENTS != '' && env.PANDOC == '1'
296285shell :pwsh
297286run :|
298287 $pandocZipPath = "pandoc.zip"
@@ -348,15 +337,15 @@ jobs:
348337
349338
350339 -name :Upgrade pip and patch launchers
351- if :env.ARTIFACT_NAME != ''
340+ if :env.WINPYREQUIREMENTS != ''
352341shell :pwsh
353342run :|
354343 & "$env:build_location\python\python.exe" -m pip install --upgrade pip
355344 & "$env:build_location\python\python.exe" -m pip install --upgrade packaging==25.0
356345 & "$env:build_location\python\python.exe" -c "from wppm import wppm;dist=wppm.Distribution();dist.patch_standard_packages('pip', to_movable=True)"
357346
358347 -name :Write env.ini file
359- if :env.ARTIFACT_NAME != ''
348+ if :env.WINPYREQUIREMENTS != ''
360349shell :pwsh
361350run :|
362351 $destDir = "$env:build_location\scripts"
@@ -369,30 +358,30 @@ jobs:
369358 Copy-Item -Path "env.ini" -Destination "$destDir\env.ini"
370359
371360 -name :Download main requirements to $env:dotwheelhouse
372- if :env.ARTIFACT_NAME != ''
361+ if :env.WINPYREQUIREMENTS != ''
373362shell :pwsh
374363run :|
375364
376- & "$env:build_location\python\python.exe" -m pip download --dest $env:dotwheelhouse --no-deps --require-hashes -r $env:WINPYrequirements
365+ & "$env:build_location\python\python.exe" -m pip download --dest $env:dotwheelhouse --no-deps --require-hashes -r $env:WINPYREQUIREMENTS
377366
378367 -name :Download additional wheelhouse requirements
379- if :env.ARTIFACT_NAME != ''
368+ if :env.WINPYREQUIREMENTS != ''
380369shell :pwsh
381370run :|
382- if ($env:WINPYrequirementswhl -eq "") {
371+ if ($env:WINPYREQUIREMENTSwhl -eq "") {
383372 Write-Output "No additional wheelhouse requirements."
384373 } else {
385- & "$env:build_location\python\python.exe" -m pip download --dest $env:destwheelhouse --no-deps --require-hashes -r $env:WINPYrequirementswhl
374+ & "$env:build_location\python\python.exe" -m pip download --dest $env:destwheelhouse --no-deps --require-hashes -r $env:WINPYREQUIREMENTSwhl
386375 }
387376
388377 -name :Install requirements
389- if :env.ARTIFACT_NAME != ''
378+ if :env.WINPYREQUIREMENTS != ''
390379shell :pwsh
391380run :|
392- & "$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
381+ & "$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
393382
394383 -name :Generate Markdown content and pylock file
395- if :env.ARTIFACT_NAME != ''
384+ if :env.WINPYREQUIREMENTS != ''
396385shell :pwsh
397386run :|
398387 mkdir publish_output
@@ -412,11 +401,11 @@ jobs:
412401 $outreq = "publish_output\requir.$env:WINPYARCH-$($env:WINPYVER -replace '\.', '_').txt"
413402 & "$env:build_location\python\python.exe" -X utf8 -c "from wppm import wheelhouse as wh; wh.pylock_to_req(r'$destfile_pylock', r'$outreq')"
414403
415- if ($env:WINPYrequirementswhl -eq "") {
404+ if ($env:WINPYREQUIREMENTSwhl -eq "") {
416405 Write-Output "No additional wheelhouse requirements."
417406 } else {
418407 $destfile_pylockwheel = "publish_output\pylock.$env:WINPYARCH-$($env:WINPYVER -replace '\.', '_')_wheels.toml"
419- & "$env:build_location\python\python.exe" -m pip lock --no-deps --require-hashes -r $env:WINPYrequirementswhl -o $destfile_pylockwheel
408+ & "$env:build_location\python\python.exe" -m pip lock --no-deps --require-hashes -r $env:WINPYREQUIREMENTSwhl -o $destfile_pylockwheel
420409
421410 $outreqwheel = "publish_output\requir.$env:WINPYARCH-$($env:WINPYVER -replace '\.', '_')_wheels.txt"
422411 & "$env:build_location\python\python.exe" -X utf8 -c "from wppm import wheelhouse as wh; wh.pylock_to_req(r'$destfile_pylockwheel', r'$outreqwheel')"
@@ -426,22 +415,22 @@ jobs:
426415 }
427416
428417 -name :Zip the result
429- if :env.ARTIFACT_NAME != '' && env.WINPYZIP == '1'
418+ if :env.WINPYREQUIREMENTS != '' && env.WINPYZIP == '1'
430419shell :pwsh
431420run :|
432421 $destfile = "publish_output\WinPython$env:WINPYARCH-$env:WINPYVER.zip"
433422 Compress-Archive -Path "$env:build_location" -DestinationPath $destfile
434423
435424 -name :7z archive the result
436- if :env.ARTIFACT_NAME != '' && env.WINPY7Z == '1'
425+ if :env.WINPYREQUIREMENTS != '' && env.WINPY7Z == '1'
437426shell :pwsh
438427run :|
439428 $destfile7z = "publish_output\WinPython$env:WINPYARCH-$env:WINPYVER.7z"
440429 $sourceDir = "$env:build_location"
441430 7z a $destfile7z $sourceDir
442431
443432 -name :7z executable archive the result
444- if :env.ARTIFACT_NAME != '' && env.WINPYEXE == '1'
433+ if :env.WINPYREQUIREMENTS != '' && env.WINPYEXE == '1'
445434shell :pwsh
446435run :|
447436 $destfile7z = "publish_output\WinPython$env:WINPYARCH-$env:WINPYVER.exe"
@@ -458,7 +447,7 @@ jobs:
4584477z a -t7z -sfx"$SFXModulePath" $destfile7z $sourceDir
459448
460449 -name :generate hashes wppm style
461- if :env.ARTIFACT_NAME != ''
450+ if :env.WINPYREQUIREMENTS != ''
462451shell :pwsh
463452run :|
464453 $DESTFILE="./publish_output/hashes.md"
@@ -470,7 +459,7 @@ jobs:
470459
471460# Example artifact upload step (optional)
472461 -name :Upload artifacts
473- if :env.ARTIFACT_NAME != ''
462+ if :env.WINPYREQUIREMENTS != ''
474463uses :actions/upload-artifact@v4
475464with :
476465name :${{ env.ARTIFACT_NAME }}