teemtee / fmf

Flexible Metadata Format
GNU General Public License v2.0
22 stars 28 forks source link

Plugin functionality #250

Open LecrisUT opened 2 months ago

LecrisUT commented 2 months ago

This PR tries to do two things:

The design is that fmf defines a FMFPlugin class that stores the entry-point, packages and environment variable that are used to define where fmf's plugins are read from. Then by subclassing FMFPlugin, e.g. TMTPlugin(FMFPlugin) and adding self to FMFPlugin it is possible to recursively load every plugin of the projects. This needs all of the plugin's packages to be pre-installed though.

This by itself is marginally useful, but when combined with an equivalent of requirements.txt that can be used to read an fmf tree's plugin packages, this makes it possible to install and load the plugins.

Other TODOs:

Closes #236