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 wheel compatibility selection
- Fixed wheel installation across all Linux builds

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 ad72e84 commit c4bf852
Showing 1 changed file with 4 additions and 14 deletions.
18 changes: 4 additions & 14 deletions .github/workflows/python-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -98,13 +98,8 @@ jobs:
echo "Available wheels:"
ls -la dist/
# Try to find the wheel file
WHEEL_FILE=$(ls dist/${{ env.PACKAGE_NAME }}-cp`echo ${{ matrix.python-version }} | tr -d '.'`*.whl || true)
if [ -z "$WHEEL_FILE" ]; then
echo "No matching wheel found for Python ${{ matrix.python-version }}"
exit 1
fi
pip install $WHEEL_FILE --force-reinstall
# Install using pip's find-links
pip install --no-index --find-links dist/ ${{ env.PACKAGE_NAME }} --force-reinstall
pip install pytest
pytest -v
- name: Upload wheels
Expand Down Expand Up @@ -151,13 +146,8 @@ jobs:
echo "Available wheels:"
ls -la dist/
# Try to find the wheel file
WHEEL_FILE=$(ls dist/${{ env.PACKAGE_NAME }}-cp`echo ${{ matrix.python-version }} | tr -d '.'`*.whl || true)
if [ -z "$WHEEL_FILE" ]; then
echo "No matching wheel found for Python ${{ matrix.python-version }}"
exit 1
fi
pip3 install $WHEEL_FILE --force-reinstall
# Install using pip's find-links
pip3 install --no-index --find-links dist/ ${{ env.PACKAGE_NAME }} --force-reinstall
pip install pytest
pytest -v
- name: Upload wheels
Expand Down

0 comments on commit c4bf852

Please sign in to comment.