Skip to content

Commit 2573fc9

Browse files
authored
fix: use environment variable for PIP_ROOT_USER_ACTION (#265)
* fix: error out on install failure in "Apply build artifact to the local machine" step * fix: error out on pip installation / update failure * fix: use environment variable for `PIP_ROOT_USER_ACTION` This extends the fix from #259 since every platform for 3.8.10 / 3.9.13 has been rebuilt instead of just macOS arm64 being added. The regression was introduced in #223
1 parent b643f0d commit 2573fc9

File tree

3 files changed

+8
-2
lines changed

3 files changed

+8
-2
lines changed

.github/workflows/build-python-packages.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,7 @@ jobs:
123123

124124
- name: Apply build artifact to the local machine
125125
run: |
126+
$PSNativeCommandUseErrorActionPreference = $true
126127
if ('${{ matrix.platform }}' -eq 'win32') {
127128
powershell ./setup.ps1
128129
} else {

installers/nix-setup-template.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,9 @@ fi
4949
chmod +x ../python $PYTHON_MAJOR $PYTHON_MAJOR_DOT_MINOR $PYTHON_MAJORMINOR python
5050

5151
echo "Upgrading pip..."
52+
export PIP_ROOT_USER_ACTION=ignore
5253
./python -m ensurepip
53-
./python -m pip install --ignore-installed pip --disable-pip-version-check --no-warn-script-location --root-user-action=ignore
54+
./python -m pip install --ignore-installed pip --disable-pip-version-check --no-warn-script-location
5455

5556
echo "Create complete file"
5657
touch $PYTHON_TOOLCACHE_VERSION_PATH/x64.complete

installers/win-setup-template.ps1

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,8 +133,12 @@ if ($MajorVersion -ne "2") {
133133
}
134134

135135
Write-Host "Install and upgrade Pip"
136+
$Env:PIP_ROOT_USER_ACTION = "ignore"
136137
$PythonExePath = Join-Path -Path $PythonArchPath -ChildPath "python.exe"
137-
cmd.exe /c "$PythonExePath -m ensurepip && $PythonExePath -m pip install --upgrade pip --no-warn-script-location --root-user-action=ignore"
138+
cmd.exe /c "$PythonExePath -m ensurepip && $PythonExePath -m pip install --upgrade pip --no-warn-script-location"
139+
if ($LASTEXITCODE -ne 0) {
140+
Throw "Error happened during pip installation / upgrade"
141+
}
138142

139143
Write-Host "Create complete file"
140144
New-Item -ItemType File -Path $PythonVersionPath -Name "$Architecture.complete" | Out-Null

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy