@@ -147,6 +147,28 @@ jobs:
147147 Add-Content -Path $env:GITHUB_ENV -Value "WINPYREQUIREMENTS=$WINPYREQUIREMENTS"
148148 Add-Content -Path $env:GITHUB_ENV -Value "WINPYREQUIREMENTSwhl=$WINPYREQUIREMENTSwhl"
149149
150+ $WINPYLOCKFILE = ''
151+ $WINPYLOCKFILEwhl = ''
152+
153+ # 2. Generate pylock files expected names dynamically
154+ $V_TAG = $env:WINPYVER2 -replace '\.', '_'
155+ $testreq = "$($env:my_cycle)/pylock.64-$($V_TAG)$($env:FLAVOR_NAME)$($env:my_release_level).toml"
156+ $testwhl = "$($env:my_cycle)/pylock.64-$($V_TAG)$($env:FLAVOR_NAME)$($env:my_release_level)_wheels.toml"
157+
158+ Write-Host "Checking for pylock files: $testreq and $testwhl (expected arch $detected_arch)"
159+
160+ if ($env:WINPYARCHDET -eq $detected_arch -and (Test-Path $testreq)) {
161+ $WINPYLOCKFILE = $testreq
162+ Write-Host "Found $WINPYLOCKFILE"
163+ if (Test-Path $testwhl) {
164+ $WINPYLOCKFILEwhl = $testwhl
165+ Write-Host "Found also $WINPYLOCKFILEwhl"
166+ }
167+ }
168+
169+ Add-Content -Path $env:GITHUB_ENV -Value "WINPYLOCKFILE=$WINPYLOCKFILE"
170+ Add-Content -Path $env:GITHUB_ENV -Value "WINPYLOCKFILEwhl=$WINPYLOCKFILEwhl"
171+
150172 $ARTIFACT_NAME = "publish_${PYTHON_VERSION}$($env:FLAVOR_NAME)"
151173 Add-Content -Path $env:GITHUB_ENV -Value "ARTIFACT_NAME=$ARTIFACT_NAME"
152174
@@ -160,46 +182,47 @@ jobs:
160182 Add-Content -Path $env:GITHUB_ENV -Value "WINPYVER2=$WINPYVER2"
161183
162184 - name : Download, verify and extract python standalone
163- if : env.WINPYREQUIREMENTS != ''
185+ if : env.WINPYLOCKFILE != ''
164186 uses : ./.github/actions/python-setup
165187 with :
166188 python_source : ${{ steps.python_config.outputs.src }}
167189 python_sha256 : ${{ steps.python_config.outputs.sha }}
168190 build_location : ${{ env.build_location }}
169191
170192 - name : Download, checking hash and integrating pandoc binary
171- if : env.WINPYREQUIREMENTS != '' && env.PANDOC == '1'
193+ if : env.WINPYLOCKFILE != '' && env.PANDOC == '1'
172194 uses : ./.github/actions/pandoc-setup
173195 with :
174196 pandoc_source : ${{ env.pandoc_source }}
175197 pandoc_sha256 : ${{ env.pandoc_sha256 }}
176198 build_location : ${{ env.build_location }}
177199
178200 - name : Upgrade pip and patch launchers
179- if : env.WINPYREQUIREMENTS != ''
201+ if : env.WINPYLOCKFILE != ''
180202 shell : pwsh
181203 run : |
182204 & "$env:build_location\python\python.exe" -m pip install --upgrade --force-reinstall pip --no-warn-script-location
183205 & "$env:build_location\python\python.exe" -c "from wppm import wppm;dist=wppm.Distribution();dist.patch_standard_packages('pip', to_movable=True)"
184206
185207 - name : Download all requirements
186- if : ${{ env.WINPYREQUIREMENTS != '' }}
208+ if : ${{ env.WINPYLOCKFILE != '' }}
187209 shell : pwsh
188210 run : |
189211 $py = "$env:build_location\python\python.exe"
190- & $py -m pip download --dest $env:dotwheelhouse --no-deps --require-hashes -r $env:WINPYREQUIREMENTS
191- if ($env:WINPYREQUIREMENTSwhl -ne '') {
192- & $py -m pip download --dest $env:destwheelhouse --no-deps --require-hashes -r $env:WINPYREQUIREMENTSwhl
212+ & $py -m pip download --dest $env:dotwheelhouse --no-deps --require-hashes -r $env:WINPYLOCKFILE
213+ if ($env:WINPYLOCKFILEwhl -ne '') {
214+ & $py -m pip download --dest $env:destwheelhouse --no-deps --require-hashes -r $env:WINPYLOCKFILEwhl
193215 }
194216
195- - name : Install requirements
196- if : env.WINPYREQUIREMENTS != ''
217+ - name : Install lockfile
218+ if : env.WINPYLOCKFILE != ''
197219 shell : pwsh
198220 run : |
199- & "$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
221+ # & "$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
222+ & "$env:build_location\python\python.exe" -m pip install --no-deps -r $env:WINPYLOCKFILE --no-warn-script-location
200223
201224 - name : Generate Assets and Hashes
202- if : env.WINPYREQUIREMENTS != ''
225+ if : env.WINPYLOCKFILE != ''
203226 uses : ./.github/actions/publish-winpython
204227 with :
205228 build_location : ${{ env.build_location }}
@@ -214,7 +237,7 @@ jobs:
214237 format_exe : ${{ matrix.flavor.formats.exe }}
215238
216239 - name : Upload artifacts
217- if : env.WINPYREQUIREMENTS != ''
240+ if : env.WINPYLOCKFILE != ''
218241 uses : actions/upload-artifact@v6
219242 with :
220243 name : ${{ env.ARTIFACT_NAME }}
0 commit comments