| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -147,6 +147,28 @@ jobs: | |||
| 147 | 147 | Add-Content -Path $env:GITHUB_ENV -Value "WINPYREQUIREMENTS=$WINPYREQUIREMENTS" | |
| 148 | 148 | Add-Content -Path $env:GITHUB_ENV -Value "WINPYREQUIREMENTSwhl=$WINPYREQUIREMENTSwhl" | |
| 149 | 149 | ||
| 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 | + | ||
| 150 | 172 | $ARTIFACT_NAME = "publish_${PYTHON_VERSION}$($env:FLAVOR_NAME)" | |
| 151 | 173 | Add-Content -Path $env:GITHUB_ENV -Value "ARTIFACT_NAME=$ARTIFACT_NAME" | |
| 152 | 174 | ||
@@ -160,46 +182,47 @@ jobs: | |||
| 160 | 182 | Add-Content -Path $env:GITHUB_ENV -Value "WINPYVER2=$WINPYVER2" | |
| 161 | 183 | ||
| 162 | 184 | - name: Download, verify and extract python standalone | |
| 163 | - if: env.WINPYREQUIREMENTS != '' | ||
| 185 | + if: env.WINPYLOCKFILE != '' | ||
| 164 | 186 | uses: ./.github/actions/python-setup | |
| 165 | 187 | with: | |
| 166 | 188 | python_source: ${{ steps.python_config.outputs.src }} | |
| 167 | 189 | python_sha256: ${{ steps.python_config.outputs.sha }} | |
| 168 | 190 | build_location: ${{ env.build_location }} | |
| 169 | 191 | ||
| 170 | 192 | - name: Download, checking hash and integrating pandoc binary | |
| 171 | - if: env.WINPYREQUIREMENTS != '' && env.PANDOC == '1' | ||
| 193 | + if: env.WINPYLOCKFILE != '' && env.PANDOC == '1' | ||
| 172 | 194 | uses: ./.github/actions/pandoc-setup | |
| 173 | 195 | with: | |
| 174 | 196 | pandoc_source: ${{ env.pandoc_source }} | |
| 175 | 197 | pandoc_sha256: ${{ env.pandoc_sha256 }} | |
| 176 | 198 | build_location: ${{ env.build_location }} | |
| 177 | 199 | ||
| 178 | 200 | - name: Upgrade pip and patch launchers | |
| 179 | - if: env.WINPYREQUIREMENTS != '' | ||
| 201 | + if: env.WINPYLOCKFILE != '' | ||
| 180 | 202 | shell: pwsh | |
| 181 | 203 | run: | | |
| 182 | 204 | & "$env:build_location\python\python.exe" -m pip install --upgrade --force-reinstall pip --no-warn-script-location | |
| 183 | 205 | & "$env:build_location\python\python.exe" -c "from wppm import wppm;dist=wppm.Distribution();dist.patch_standard_packages('pip', to_movable=True)" | |
| 184 | 206 | ||
| 185 | 207 | - name: Download all requirements | |
| 186 | - if: ${{ env.WINPYREQUIREMENTS != '' }} | ||
| 208 | + if: ${{ env.WINPYLOCKFILE != '' }} | ||
| 187 | 209 | shell: pwsh | |
| 188 | 210 | run: | | |
| 189 | 211 | $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 | ||
| 193 | 215 | } | |
| 194 | 216 | ||
| 195 | - - name: Install requirements | ||
| 196 | - if: env.WINPYREQUIREMENTS != '' | ||
| 217 | + - name: Install lockfile | ||
| 218 | + if: env.WINPYLOCKFILE != '' | ||
| 197 | 219 | shell: pwsh | |
| 198 | 220 | 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 | ||
| 200 | 223 | ||
| 201 | 224 | - name: Generate Assets and Hashes | |
| 202 | - if: env.WINPYREQUIREMENTS != '' | ||
| 225 | + if: env.WINPYLOCKFILE != '' | ||
| 203 | 226 | uses: ./.github/actions/publish-winpython | |
| 204 | 227 | with: | |
| 205 | 228 | build_location: ${{ env.build_location }} | |
@@ -214,7 +237,7 @@ jobs: | |||
| 214 | 237 | format_exe: ${{ matrix.flavor.formats.exe }} | |
| 215 | 238 | ||
| 216 | 239 | - name: Upload artifacts | |
| 217 | - if: env.WINPYREQUIREMENTS != '' | ||
| 240 | + if: env.WINPYLOCKFILE != '' | ||
| 218 | 241 | uses: actions/upload-artifact@v6 | |
| 219 | 242 | with: | |
| 220 | 243 | name: ${{ env.ARTIFACT_NAME }} | |
| Back | FazBrowse Home | New Git URL |
0 commit comments