Skip to content

Use uv and caching in CI#4515

Open
galenlynch wants to merge 3 commits intoSpikeInterface:mainfrom
galenlynch:ci/uv-pip-install
Open

Use uv and caching in CI#4515
galenlynch wants to merge 3 commits intoSpikeInterface:mainfrom
galenlynch:ci/uv-pip-install

Conversation

@galenlynch
Copy link
Copy Markdown
Contributor

Should speed things up!

Should speed things up.
v8.0.0 exists, but they haven't made a major tag yet.
@samuelgarcia
Copy link
Copy Markdown
Member

very cool.
why do we need the --system flag ? for caching ?

@galenlynch
Copy link
Copy Markdown
Contributor Author

galenlynch commented Apr 15, 2026

So uv uses the setup-python-installed python and installs packages into that, instead of trying to use its own python and venv. That allows python args... commands to 'just work', instead of needing to do uv run python args.... Since not all maintainers are using uv lockfiles etc, I think this is the simplest way to use uv pip as a faster pip, instead of having to adopt uv's entire workflow.

Python is also cached on many of the github runners, so setup-python is quite a bit faster (it's already on the runner) than using uv to get python (download over network).

@galenlynch
Copy link
Copy Markdown
Contributor Author

galenlynch commented Apr 15, 2026

Put another way, pip install already installs into the system site packages if it's not run in a virtual environment. In contrast, uv pip install will install into a uv-maintained virtual environment even if it's not run in a virtual environment. To truly emulate pip install with uv, you need to tell uv you really want to mutate the system site packages with uv pip install --system, or set an equivalent environment variable (but that affects all other uv commands, which might not be what you want).

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.

2 participants