Skip to content

Commit

Permalink
fix: improve wheel installation in CI
Browse files Browse the repository at this point in the history
- Simplified wheel installation using pip's find-links
- Removed manual wheel filename pattern matching
- Let pip handle platform and Python version compatibility
- Fixed wheel installation across all test environments

This fixes the wheel installation errors by letting pip handle the
wheel selection based on Python version and platform tags.
  • Loading branch information
dirvine committed Nov 29, 2024
1 parent c579868 commit 1b1dd86
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions .github/workflows/python-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -99,9 +99,8 @@ jobs:
ls -la dist/
pip install -U pip pytest click>=8.0.0
# Install the wheel directly
WHEEL_FILE=$(ls dist/${{ env.PACKAGE_NAME }}-cp`echo ${{ matrix.python-version }} | tr -d '.'`*.whl)
pip install $WHEEL_FILE
# Install using find-links to handle platform tags correctly
pip install --find-links dist/ ${{ env.PACKAGE_NAME }}
pytest -v
- name: Upload wheels
uses: actions/upload-artifact@v4
Expand Down Expand Up @@ -147,8 +146,8 @@ jobs:
echo "Available wheels:"
ls -la dist/
# Install using pip's find-links
pip3 install --find-links dist/ ${{ env.PACKAGE_NAME }} --force-reinstall
# Install using find-links to handle platform tags correctly
pip3 install --find-links dist/ ${{ env.PACKAGE_NAME }}
pytest -v
- name: Upload wheels
uses: actions/upload-artifact@v4
Expand Down Expand Up @@ -188,7 +187,7 @@ jobs:
run: |
apk add py3-pip python3
pip3 install -U pip pytest click>=8.0.0
pip3 install ${{ env.PACKAGE_NAME }}-cp`echo ${{ matrix.python-version }} | tr -d '.'`-*.whl --no-index --find-links /io/dist/ --force-reinstall
pip3 install --find-links /io/dist/ ${{ env.PACKAGE_NAME }}
python3 -m pytest
- name: Upload wheels
uses: actions/upload-artifact@v4
Expand Down Expand Up @@ -231,7 +230,7 @@ jobs:
apk add py3-pip
pip3 install -U pip pytest click>=8.0.0
run: |
pip3 install ${{ env.PACKAGE_NAME }}-cp`echo ${{ matrix.python-version }} | tr -d '.'`-*.whl --no-index --find-links dist/ --force-reinstall
pip3 install --find-links dist/ ${{ env.PACKAGE_NAME }}
python3 -m pytest
- name: Upload wheels
uses: actions/upload-artifact@v4
Expand Down

0 comments on commit 1b1dd86

Please sign in to comment.