Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: always reinstall pip #271

Merged
merged 2 commits into from
May 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
10 changes: 5 additions & 5 deletions .github/workflows/build-python-packages.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
name: Build Python package
run-name: Generate Python ${{ inputs.VERSION || '3.11.0' }}
run-name: Generate Python ${{ inputs.VERSION || '3.12.3' }}
on:
workflow_dispatch:
inputs:
VERSION:
description: 'Python version to build and upload'
default: '3.11.0'
default: '3.12.3'
required: true
PUBLISH_RELEASES:
description: 'Whether to publish releases'
Expand All @@ -25,7 +25,7 @@ on:
- 'main'

env:
VERSION: ${{ inputs.VERSION || '3.11.0' }}
VERSION: ${{ inputs.VERSION || '3.12.3' }}
defaults:
run:
shell: pwsh
Expand Down Expand Up @@ -67,7 +67,7 @@ jobs:
include: ${{ fromJson(needs.generate_matrix.outputs.matrix) }}
runs-on: ${{ matrix.os }}
env:
ARTIFACT_NAME: python-${{ inputs.VERSION || '3.11.0' }}-${{ matrix.platform }}-${{ matrix.arch }}
ARTIFACT_NAME: python-${{ inputs.VERSION || '3.12.3' }}-${{ matrix.platform }}-${{ matrix.arch }}
steps:

- name: Check out repository code
Expand All @@ -94,7 +94,7 @@ jobs:
include: ${{ fromJson(needs.generate_matrix.outputs.matrix) }}
runs-on: ${{ matrix.os }}
env:
ARTIFACT_NAME: python-${{ inputs.VERSION || '3.11.0' }}-${{ matrix.platform }}-${{ matrix.arch }}
ARTIFACT_NAME: python-${{ inputs.VERSION || '3.12.3' }}-${{ matrix.platform }}-${{ matrix.arch }}
steps:

- name: Check out repository code
Expand Down
2 changes: 1 addition & 1 deletion installers/macos-pkg-setup-template.sh
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ chmod +x ../python $PYTHON_MAJOR $PYTHON_MAJOR_DOT_MINOR $PYTHON_MAJOR_MINOR pyt
echo "Upgrading pip..."
export PIP_ROOT_USER_ACTION=ignore
./python -m ensurepip
./python -m pip install --upgrade pip --disable-pip-version-check --no-warn-script-location
./python -m pip install --upgrade --force-reinstall pip --disable-pip-version-check --no-warn-script-location

echo "Install OpenSSL certificates"
sh -e "${PYTHON_APPLICATION_PATH}/Install Certificates.command"
Expand Down
2 changes: 1 addition & 1 deletion installers/nix-setup-template.sh
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ chmod +x ../python $PYTHON_MAJOR $PYTHON_MAJOR_DOT_MINOR $PYTHON_MAJORMINOR pyth
echo "Upgrading pip..."
export PIP_ROOT_USER_ACTION=ignore
./python -m ensurepip
./python -m pip install --upgrade pip --disable-pip-version-check --no-warn-script-location
./python -m pip install --upgrade --force-reinstall pip --disable-pip-version-check --no-warn-script-location

echo "Create complete file"
touch $PYTHON_TOOLCACHE_VERSION_PATH/x64.complete
2 changes: 1 addition & 1 deletion installers/win-setup-template.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ if ($MajorVersion -ne "2") {
Write-Host "Install and upgrade Pip"
$Env:PIP_ROOT_USER_ACTION = "ignore"
$PythonExePath = Join-Path -Path $PythonArchPath -ChildPath "python.exe"
cmd.exe /c "$PythonExePath -m ensurepip && $PythonExePath -m pip install --upgrade pip --no-warn-script-location"
cmd.exe /c "$PythonExePath -m ensurepip && $PythonExePath -m pip install --upgrade --force-reinstall pip --no-warn-script-location"
if ($LASTEXITCODE -ne 0) {
Throw "Error happened during pip installation / upgrade"
}
Expand Down