Commit Graph

24 Commits

Author SHA1 Message Date
Fabio Manganiello f06233801b
[#394] Dynamically generate setup extras.
Also, convert all code that relied on `manifest.yaml` to use
`manifest.json` instead.

Closes: #394
2024-05-17 02:21:57 +02:00
Fabio Manganiello 6e1ab92298
New components cache management.
continuous-integration/drone/push Build is passing Details
The cache is no longer generated at runtime when the application runs -
which may take quite a while, especially on fresh installations.

A `components.json.gz` file is instead generated by the CI/CD process on
every commit to the main branch, and distributed with the package.

The application will read this file when the `inspect` plugin is first
initialized.

This also means that we can no longer cache the `install_cmds`, as they
change depending on the target OS. A new
`application.get_install_commands` action has now been made available to
the UI, so it can get the correct installation commands at runtime.
2024-01-06 22:21:59 +01:00
Fabio Manganiello 8817581061
Removed `-U` option from pip command when installing deps.
continuous-integration/drone/push Build is passing Details
We don't need to forcefully upgrade packages that don't need to be
upgraded.
2023-11-18 16:07:16 +01:00
Fabio Manganiello a909dc5f0f
[Fix] The base per-OS requirements filename is always lowercase. 2023-10-22 01:45:23 +02:00
Fabio Manganiello e40a74f11c
Added `install_cmds` to the JSON representation of a manifest. 2023-10-18 03:00:50 +02:00
Fabio Manganiello 608844ca0c
[WIP] Large refactor of the inspection plugin and models. 2023-10-09 01:33:44 +02:00
Fabio Manganiello 343972b520
New `IntegrationMetadata` generic util class.
continuous-integration/drone/push Build is passing Details
This object is in charge of parsing all the metadata of a
plugin/backend.
2023-09-30 02:28:20 +02:00
Fabio Manganiello a872d6f554
Added Fedora to the available Docker base images. 2023-09-22 19:02:13 +02:00
Fabio Manganiello 3e8d6bb01e Removed `typing-extensions` dependency.
continuous-integration/drone/push Build is failing Details
The package isn't present on older versions of Debian.
2023-09-18 14:05:39 +02:00
Fabio Manganiello 9aaf2559fa
Added `utils.is_root` method. 2023-08-31 23:21:32 +02:00
Fabio Manganiello 429658e7c8
Refactored `PackageManager` classes.
continuous-integration/drone/push Build is passing Details
Instead of having a custom `get_installed` callable field, with
replicated code for each package manager, the field has now been
promoted to a class method containing the common logic, and the
instances now expect a `list` field (base command to list the installed
packages using the specified package manager) and a `parse_list_line`
callback field (to extract the base package name given a raw line from
the command above).

Also, we shouldn't run the list command if we're running within a Docker
context - the host and container environments will be different.
2023-08-28 01:26:19 +02:00
Fabio Manganiello f230fa79bb
`to_pkg_install_commands` should skip already installed sys packages. 2023-08-23 11:51:53 +02:00
Fabio Manganiello 449821673c
Added `PackageManager.get_installed`. 2023-08-23 10:50:29 +02:00
Fabio Manganiello 1ef0d804db
Added `full_command` argument to `to_pip_install_commands`.
This is useful if we just want to get the list of pip dependencies and
create our own pip command.
2023-08-23 02:19:54 +02:00
Fabio Manganiello 2bff4c9cf1
Exclude python-* system packages when installing in a venv. 2023-08-23 02:17:19 +02:00
Fabio Manganiello cddf318fa7
Dependencies.from_config should include the base system deps. 2023-08-23 02:16:33 +02:00
Fabio Manganiello 8f39231d31
Added new utility methods to the Dependencies class. 2023-08-23 02:15:50 +02:00
Fabio Manganiello 10c0e5fcad
Added default_os field to PackageManagers enum elements.
This is useful to determine which is the default set of scripts that
should be used by the installer depending on the detected installed
package manager.
2023-08-20 21:21:37 +02:00
Fabio Manganiello a6f8021150
`PackageManager` has both `install` and `uninstall`.
continuous-integration/drone/push Build is passing Details
2023-08-20 13:33:49 +02:00
Fabio Manganiello 28ba042810
If no configuration file is passed to platydock generate a minimal Dockerfile.
continuous-integration/drone/push Build was killed Details
2023-08-20 03:36:34 +02:00
Fabio Manganiello 71c5291190
Refactored the interface of Platydock and manifest utils. 2023-08-19 22:46:37 +02:00
Fabio Manganiello 9002f3034a
Tweaked package managers install command arguments. 2023-08-19 13:46:08 +02:00
Fabio Manganiello dd3a701a2e
Full rewrite of `platypush.utils.manifest`.
The new version encapsulates all the utility functions into three
classes - `Manifest`, `Manifests` and `Dependencies`.
2023-08-19 13:28:40 +02:00
Fabio Manganiello 3bfc5b83ef Moved to manifest files for describing plugins and backends and their dependencies 2021-09-16 17:53:40 +02:00