-
-
Notifications
You must be signed in to change notification settings - Fork 271
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
pytest-step in provided GitHub action prefers remote package over local #1971
Comments
See also #1680 |
I am really tired after 72 hours of debugging. I have commented on pip: |
Hi @messense, Would you be willing to switch to Suggested by : pypa/pip#12110 (comment) |
You can already do that by modifying the generated the CI configuration file. Adding |
UV now supports local directories lookup with this pr: |
As a workaround, I've added --no-index to my project before every --find-links – that works at least for the Linux and Windows targets (there is a I'd guess that this workaround as it is is limited to packages without dependencies; packages with dependencies would need to install the dependencies prior to the --no-index --find-links dist installations, or do an install without --no-index first, uninstall, and reinstall with --no-index --find-links (which works only as long as the package has not acquired new dependencies since the last release). |
Fortunately we have no Python deps so the workaround suggested in [1] is enough... [1]: PyO3/maturin#1971 (comment)
Bug Description
The Github-action generated by Maturin may contain default steps for running
pytest
. The juicy parts of thosepytest
-step are:set -e pip install [package] --find-links dist --force-reinstall pip install pytest pytest
I noticed that CI started to fail after releasing a new version, and then adding new commits. The problem is that the
pip install [package]
prefers the remote package over the locally built wheel indist
if the version-number is the same. Therefor, the tests execute against an outdated package as long as the version number is not bumped. This seems highly surprising behavior.Your maturin version (
maturin --version
)1.4.0
Your Python version (
python -V
)3.11
Your pip version (
pip -V
)23.3
What bindings you're using
pyo3
Does
cargo build
work?If on windows, have you checked that you aren't accidentally using unix path (those with the forward slash
/
)?Steps to Reproduce
HEAD
.pytest
now (and only now) starts using the package built bysdist
fromHEAD
.The text was updated successfully, but these errors were encountered: