Reckless uv installer#8430
Conversation
| return cloned_plugin | ||
|
|
||
|
|
||
| def install_python_uv(cloned_plugin: InstInfo): |
There was a problem hiding this comment.
why not just replace pip installation with uv as it supports all its capabilities
There was a problem hiding this comment.
why not just replace pip installation with uv as it supports all its capabilities
What if user doesn't have uv but has pip/poetry?
There was a problem hiding this comment.
I think the general upgrade path is:
- Add the ability to install with uv.
- Switch python plugins over to a uv package management (this will break those plugins for existing users until they upgade to CLN/reckless 25.09
- Remove the legacy installers from reckless if no longer needed.
We generally try to support the last three releases, so encouraging all python plugins to switch to uv now would impact users of prior CLN versions. Unless we have a reliable way translate pip package requirements into a uv lockfile and do dependency resolution, I think we should keep the legacy installers around for a healthy amount of overlap as plugins make the transition.
There was a problem hiding this comment.
Makes sense yeah I got the answer myself after pondering on it just didn't get to reply. We should definitely keep pip but remove poetry in the later releases probably as giving people too many options to do a single thing doesn't seem like a good idea.
If we can just pivot on uv as primary python plugin management tool that would be great.
ShahanaFarooqui
left a comment
There was a problem hiding this comment.
-
I wanted to test the plugin with a real-world UV-managed Python plugin but couldn’t find any suitable example. Do you have any recommendation for a known project that uses UV for plugin management?
-
Additionally, would it make sense to add a test case for installing a test plugin via uv installer as well?
| (Path(cloned_plugin.source_loc) / 'pyproject.toml').\ | ||
| symlink_to(source / 'pyproject.toml') |
There was a problem hiding this comment.
can we add support for requirements.txt using uv too?
Some installer procedures have more options for valid entypoint names than others. We iterate through each of their first choices, then their second choices, etc..
uv is a python installation and package manager written in rust. We can use it to quickly install python package dependencies and configure our plugin's python virtual environment. To maintain consistency with our other reckless python installations, the venv is still activated in a wrapper which then imports the original python source. Changelog-added: reckless can now install python plugins using the uv package manager.
d98a82a to
358aad8
Compare
Those that only have a requirements.txt can be installed with uv even if it's not managing the project requirements.
|
Added a uv managed test project and blackbox test. Also added a two-step uv bare virtual env creation + uv installation via |
Important
25.09 FREEZE July 28TH: Non-bugfix PRs not ready by this date will wait for 25.12.
RC1 is scheduled on August 11th
The final release is scheduled for September 1st.
Checklist
Before submitting the PR, ensure the following tasks are completed. If an item is not applicable to your PR, please mark it as checked:
This PR allows reckless to use the uv python package manager when installing plugins. It maintains the same virtual environment location and source code location as used by the pip and poetry installers. There's also a driveby fix of an obscure direct install bug.