Skip to content

Commit

Permalink
CI: use --break-system-packages when using pip globally
Browse files Browse the repository at this point in the history
seems like recent versions of pip on some OSes is preventing
the user from installing things globally

we should override it, since we know what are we doing (most of the time).
anyhow that code is run only in CI, and never locally

Ref: https://veronneau.org/python-311-pip-and-breaking-system-packages.html
  • Loading branch information
fruch committed May 30, 2024
1 parent 82b4863 commit 8c562f4
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions .github/workflows/build-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,16 @@ jobs:
platform: PyPy

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- uses: actions/setup-python@v4
- uses: actions/setup-python@v5
name: Install Python

- name: Enable pip installing globally
if: runner.os == 'MacOs' || runner.os == 'Windows'
run: |
echo "PIP_BREAK_SYSTEM_PACKAGES=1" >> $GITHUB_ENV
- name: Install cibuildwheel
run: |
python3 -m pip install cibuildwheel==2.16.2
Expand Down Expand Up @@ -124,17 +129,17 @@ jobs:
if: "(!contains(github.event.pull_request.labels.*.name, 'disable-test-build'))|| github.event_name == 'push' && endsWith(github.event.ref, 'scylla')"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- uses: actions/setup-python@v4
- uses: actions/setup-python@v5
name: Install Python

- name: Build sdist
run: |
pip install build
python -m build --sdist
- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v4
with:
path: dist/*.tar.gz

Expand All @@ -146,7 +151,7 @@ jobs:
# alternatively, to publish when a GitHub Release is created, use the following rule:
# if: github.event_name == 'release' && github.event.action == 'published'
steps:
- uses: actions/download-artifact@v2
- uses: actions/download-artifact@v4
with:
name: artifact
path: dist
Expand Down

0 comments on commit 8c562f4

Please sign in to comment.