XDM
XDM copied to clipboard
Handle plugin requirements
Hi,
I think some libraries should be used by many plugins. In exemple, i have some plugins that use bencode.py (.torrent file tools).
In my opinion, it may be fine to find a way to share this libraries. I have two ways in mind :
- only add the shared library in the /lib/ folder of XDM.
- or create a system that handles requirements of a plugin and download automatically required plugins or libraries (py file or folder with init.py) during the install.
What's your own opinion ? Do you have a better idea ?
Mhh python lib dependency not much thought I was thinking about plugin dependency or plugin groups
I'll have a look how I could integrate a requirements.txt ala pip or pybundle Or wheel package download but that would mean that the system XDM runs on needs the chosen package system ...
OR I switch to python 3.4 and use pip pip comes with python 3.4 :P
I'll have a look how I could integrate a requirements.txt ala pip or pybundle
I think a new file isn't necessary, you can use meta.json in order to add something like a new field containing a json dict of link (github .zip link) ?
OR I switch to python 3.4 and use pip It's a really good idea, what is your progress on upgrading XDM from 2.7 to 3.x ?
I also think that a changelog system would be great (on XDM and its plugins), but no idea how to implement it.
okay a friend suggested why not use plugins as libraries so yeah i will create a library type plugin that simply contains the wanted / needed library either as it is now within the rootlibs folder or simpler
this would mean plugins need a "dependency" list in the plugins class itself and in the meta.json this will require a version and identifier
something like
dependency: {
"identifier": "de.lad1337.lib.guessit",
"major_version": 0,
"minor_version": 5
}
but these plugins are very cumbersome do make and just replicate pip
so why not have a format
"pip"
that would install the python module either in a external lib folder
(probably just the external pluginfolder
/Library)
or in the normal external pluginfolder
/plugin type class
this would alow to have XDM plugins in pypi and install any libarary dependency can then also look like
dependency: {
"identifier": "guessit",
"major_version": 0,
"minor_version": 5,
"pip": true
}
now i have to figure out to control / use pip from within python
A library plugin would be great !