Skip to content

Commit

Permalink
Run more github actions in locally installed Python
Browse files Browse the repository at this point in the history
This patch replaces the --break-system-packages introduced in d4a856d by
locally installed Python interpretors to fix Github actions.
  • Loading branch information
gertjanvanzwieten committed Oct 21, 2024
1 parent c877329 commit 5954b70
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 7 deletions.
8 changes: 6 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,14 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Install dependencies
run: python3 -m pip --break-system-packages install flit
run: python -um pip install flit
- name: Build package
run: python3 -m flit build
run: python -um flit build
- name: Publish package to PyPI
uses: pypa/[email protected]
with:
Expand Down
18 changes: 13 additions & 5 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,19 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Install build dependencies
run: python3 -m pip install --break-system-packages flit
run: python -um pip install flit
- name: Build package
id: build
run: |
# To make the wheels reproducible, set the timestamp of the (files in
# the) generated wheels to the date of the commit.
export SOURCE_DATE_EPOCH=`git show -s --format=%ct`
python3 -m flit build
python -um flit build
echo wheel=`echo dist/*.whl` >> $GITHUB_OUTPUT
- name: Upload package artifacts
uses: actions/upload-artifact@v4
Expand Down Expand Up @@ -181,12 +185,16 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Install dependencies
run: |
python3 -um pip install --break-system-packages setuptools wheel
python3 -um pip install --break-system-packages --upgrade --upgrade-strategy eager .[docs]
python -um pip install setuptools wheel
python -um pip install --upgrade --upgrade-strategy eager .[docs]
- name: Build docs
run: python3 -m sphinx -n -W --keep-going docs build/sphinx/html
run: python -um sphinx -n -W --keep-going docs build/sphinx/html
build-and-test-container-image:
name: Build container image
needs: build-python-package
Expand Down

0 comments on commit 5954b70

Please sign in to comment.