@@ -203,63 +203,20 @@ jobs:
203203 run : |
204204 & "$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
205205
206- - name : Generate Markdown content and pylock file
206+ - name : Generate Assets and Hashes
207207 if : env.WINPYREQUIREMENTS != ''
208- shell : pwsh
209- run : |
210- mkdir publish_output
211-
212- # Ensure unicode for wppm output
213- $env:PYTHONIOENCODING="utf-8"
214-
215- $destfile_md = "publish_output\WinPython$env:WINPYFLAVOR-$($env:WINPYARCH)bit-$env:WINPYVER2.md"
216- & "$env:build_location\python\python.exe" -m wppm -md | Out-File -FilePath $destfile_md -Encoding utf8
217-
218- gc $destfile_md
219-
220- & "$env:build_location\python\python.exe" -m pip freeze | Out-File -FilePath dotpython\freeze.txt
221- $destfile_pylock = "publish_output\pylock.$env:WINPYARCH-$($env:WINPYVER -replace '\.', '_').toml"
222- & "$env:build_location\python\python.exe" -m pip lock --no-deps --find-links=$env:dotwheelhouse -r dotpython\freeze.txt -o $destfile_pylock
223-
224- $outreq = "publish_output\requir.$env:WINPYARCH-$($env:WINPYVER -replace '\.', '_').txt"
225- & "$env:build_location\python\python.exe" -X utf8 -c "from wppm import wheelhouse as wh; wh.pylock_to_req(r'$destfile_pylock', r'$outreq')"
226-
227- if ($env:WINPYREQUIREMENTSwhl -eq "") {
228- Write-Output "No additional wheelhouse requirements."
229- } else {
230- $destfile_pylockwheel = "publish_output\pylock.$env:WINPYARCH-$($env:WINPYVER -replace '\.', '_')_wheels.toml"
231- & "$env:build_location\python\python.exe" -m pip lock --no-deps --require-hashes -r $env:WINPYREQUIREMENTSwhl -o $destfile_pylockwheel
232-
233- $outreqwheel = "publish_output\requir.$env:WINPYARCH-$($env:WINPYVER -replace '\.', '_')_wheels.txt"
234- & "$env:build_location\python\python.exe" -X utf8 -c "from wppm import wheelhouse as wh; wh.pylock_to_req(r'$destfile_pylockwheel', r'$outreqwheel')"
235- Copy-Item -Path $outreqwheel -Destination (Join-Path $env:build_location "wheelhouse") -Force
236- Copy-Item -Path $destfile_pylockwheel -Destination (Join-Path $env:build_location "wheelhouse") -Force
237- }
238-
239- - name : compress the result (zip / 7z / self-extracting.exe)
240- if : env.WINPYREQUIREMENTS != ''
241- shell : pwsh
242- run : |
243- $destfile = "publish_output\WinPython$env:WINPYARCH-$env:WINPYVER.zip"
244- if ("${{ matrix.flavor.formats['zip'] }}" -eq "true") { Compress-Archive -Path "$env:build_location" -DestinationPath $destfile }
245-
246- $destfile = "publish_output\WinPython$env:WINPYARCH-$env:WINPYVER.7z"
247- if ("${{ matrix.flavor.formats['7z'] }}" -eq "true") { 7z a $destfile $env:build_location }
248-
249- $destfile = "publish_output\WinPython$env:WINPYARCH-$env:WINPYVER.exe"
250- $SFXModulePath = "C:\Program Files\7-Zip\7z.sfx"
251- if ("${{ matrix.flavor.formats['exe'] }}" -eq "true") { 7z a -t7z -sfx"$SFXModulePath" $destfile $env:build_location }
252-
253- - name : generate hashes wppm style
254- if : env.WINPYREQUIREMENTS != ''
255- shell : pwsh
256- run : |
257- $DESTFILE="./publish_output/hashes.md"
258- Get-ChildItem -Path ".\publish_output\*.*"
259- # Get the list of files matching the pattern and pass them as arguments
260- $filesToHash = Get-ChildItem -Path ".\publish_output\*64*.*"
261- & "$env:build_location\python\python.exe" -c "import sys;from wppm import hash; hash.print_hashes(sys.argv[1:])" @($filesToHash.FullName) | Out-File -FilePath $DESTFILE
262- gc $DESTFILE
208+ uses : ./.github/actions/publish-winpython
209+ with :
210+ build_location : ${{ env.build_location }}
211+ winpy_flavor : ${{ env.WINPYFLAVOR }}
212+ winpy_arch : ${{ env.WINPYARCH }}
213+ winpy_ver : ${{ env.WINPYVER }}
214+ winpy_ver2 : ${{ env.WINPYVER2 }}
215+ dotwheelhouse : ${{ env.dotwheelhouse }}
216+ winpy_requirements_whl : ${{ env.WINPYREQUIREMENTSwhl }}
217+ format_zip : ${{ matrix.flavor.formats.zip }}
218+ format_7z : ${{ matrix.flavor.formats.7z }}
219+ format_exe : ${{ matrix.flavor.formats.exe }}
263220
264221 - name : Upload artifacts
265222 if : env.WINPYREQUIREMENTS != ''
0 commit comments