trigger rebuilds when virtualenv changes#6008
Conversation
Merging this PR will improve performance by 13.8%
Performance Changes
Comparing Footnotes
|
Nice! This probably doesn't help my pyenv workflow which doesn't rely on virtualenvs but maybe there's similar metadata we can check for in a pyenv-managed install. Glad to see there's a solution that will work for people who aren't doing atrocities with global Python environments like I am. |
* trigger rebuilds when virtualenv changes * newsfragment
I realised that frequently I am attempting to test specific Python versions with commands like
UV_PYTHON=3.12 uv run cargo test --test test_compile_errorUnfortunately at the moment, even though
uvrecreates the venv, we don't reconfigure the build. (Full details of why are basically the same as #4882.)I realised today that when the venv is recreated there will be a new
pyvenv.cfgfile created, and that will have a new mtime, so we should be able to reliably trigger a rebuild based on that.