This was overloading the reckless-rpc plugin input when outputting
json all in one shot. The verbosity was mostly dependency resolution
which wasn't all that helpful so call uv pip install as normal.
Changelog-None: bug introduced this release.
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.
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..
This updates all reckless-installed plugins with `reckless update` or
update individual plugins by passing the plugin names as arguments.
The metadata stored with the installed plugin is used to find the
plugin from the appropriate source (the same source is used as when
originally installed.)
Changelog-Added: Reckless: `reckless update` updates all reckless-installed plugins.
This allows installing a local plugin directly without having
to modify reckless sources.
Changelog-changed: Reckless can be passed a local file or directory for installation.
Also redirect config creation prompts to stderr in order to not interfere
with json output on stdout.
Changelog-Added: reckless provides json output with option flag -j/--json
This follows the same structure that enables python virtual environments:
reckless/
<plugin_name>/
<symlink to compiled bin>
source/
<clone of original source plugin dir>/
Changelog-Added: Reckless: added the ability to install rust plugins.
Due to the API ratelimit, this allows cloning a github repo and searching
the result rather than searching via the REST API. If a source has
already been cloned, it is fetched and the default branch checked out.
Fixes a failure reported by @farscapian
Changelog-Fixed: Reckless no longer fails on github API ratelimit.
Github API calls are now ratelimited to 60 per hour. Searching through
the subdirectory contents of lightningd/plugins will hit this limit after
two searches or installs. The simple answer is to look for the directory
rather than verifying a valid entrypoint in a suitably-named directory
prior to cloning the repository.
Also corrects a bug that was flagging submodules as files while
populating directory contents.
This uses pip to install to a venv when the dependencies are specified
with requirements.txt and poetry when it's present on the system and the
plugin has a pyproject.toml.
The directory structure will be:
reckless/
source/ (original plugin code here)
plugin_entrypoint (original entrypoint)
plugin_name (symlink or wrapper to activate venv)
.metadata (installation information)
.venv/ (python virtual environment)
The wrapper matches the naming of the original plugin entrypoint. The
shebang is modified to use the virtual environment's python binary,
then the original plugin is imported as a module and executed as though
it was run directly.
Changelog-Changed: reckless installs python plugins in virtual environments
The metadata includes an original retrieval source, timestamp, and commit
hash. This will allow a future update command to more easily evaluate the
status of the existing installation.