Commit Graph

8 Commits

Author SHA1 Message Date
Alex Myers 140e33b13a pytest: add tests for pip and poetry installed virtual envs
Also test checkout of a git tag on installation.
2024-02-07 13:24:34 +01:00
Alex Myers 90a20ff6e3 reckless: create virtual environments for python plugins
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
2024-02-07 13:24:34 +01:00
Alex Myers c043bf2255 reckless: properly remove entry from reckless sources
Fixes a bug introduced in 6163138420 which
avoided gratuitous rewrites of the lightningd config
2024-02-07 13:24:34 +01:00
Alex Myers 7915a9d678 pytest: add reckless local install test 2023-07-27 06:53:49 +09:30
Alex Myers 8704a4b499 reckless: add installation capability for additional sources
Abstracts search and directory traversal. Adds support for installing
from a local git repository, a local directory, or a web hosted git repo
without relying on an api.

Changelog-Changed: Reckless can now install directly from local sources.
2023-07-27 06:53:49 +09:30
Alex Myers 782c17996e pytest: ignore pip warning
Avoids failing the test with the pip warning:
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv

reported by: @ksedgwic
Changelog-None
2023-04-24 13:08:15 -07:00
Alex Myers 233f05e0e2 reckless: enable case-insensitive searching
Adds a test to validate case matching.
2023-04-15 10:33:07 -07:00
Alex Myers 2f050621b0 pytest: add blackbox tests for reckless
A canned lightningd/plugins is used to test against. This allows faster
and more deterministic outcomes.

Changelog-None
2023-04-09 12:41:11 +09:30