-
Notifications
You must be signed in to change notification settings - Fork 950
Reckless uv installer #8430
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
base: master
Are you sure you want to change the base?
Reckless uv installer #8430
Conversation
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.
@@ -983,6 +986,37 @@ def cargo_installation(cloned_plugin: InstInfo): | |||
return cloned_plugin | |||
|
|||
|
|||
def install_python_uv(cloned_plugin: InstInfo): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why not just replace pip installation with uv
as it supports all its capabilities
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
-
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we add support for requirements.txt
using uv
too?
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.