Skip to content

generate-ci: use uv pip for pytest steps to fix local wheel preference#3063

Merged
messense merged 1 commit into
PyO3:mainfrom
messense:fix/ci-use-uv-pip-for-pytest
Mar 3, 2026
Merged

generate-ci: use uv pip for pytest steps to fix local wheel preference#3063
messense merged 1 commit into
PyO3:mainfrom
messense:fix/ci-use-uv-pip-for-pytest

Conversation

@messense

@messense messense commented Mar 3, 2026

Copy link
Copy Markdown
Member

Switch from pip to uv pip in generated CI pytest steps for host-based platforms (ManyLinux x86, Windows, macOS). This fixes #1971 where pip prefers remote packages over local wheels in dist/ when versions match.

  • Add astral-sh/setup-uv@v7 step before pytest for host platforms
  • Use 'uv venv' and 'uv pip install' with --no-index --no-deps --reinstall to ensure the local wheel is always installed first
  • Keep pip for container-based steps (QEMU, Docker alpine, Emscripten) with --no-index --no-deps fix applied

Switch from pip to uv pip in generated CI pytest steps for host-based
platforms (ManyLinux x86, Windows, macOS). This fixes PyO3#1971 where pip
prefers remote packages over local wheels in dist/ when versions match.

- Add astral-sh/setup-uv@v7 step before pytest for host platforms
- Use 'uv venv' and 'uv pip install' with --no-index --no-deps --reinstall
  to ensure the local wheel is always installed first
- Keep pip for container-based steps (QEMU, Docker alpine, Emscripten)
  with --no-index --no-deps fix applied
@messense messense enabled auto-merge (squash) March 3, 2026 13:48
@messense messense merged commit aec5765 into PyO3:main Mar 3, 2026
45 checks passed
@messense messense deleted the fix/ci-use-uv-pip-for-pytest branch March 3, 2026 14:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

pytest-step in provided GitHub action prefers remote package over local

1 participant