2019-10-15, 18:09
Update and explanations:
Original posts below
I was testing the latest nightly for Py3 addon compatibility and I incurred in a problem with BeautifulSoup where it required/complained about the need of the module soupsieve. I also had problems with other modules, but let's stick with that for a moment.
I took the module, created the directory structure, the appropriate addon.xml, zipped it together and installed it in Kodi. So far so good. Restarted for good measure, the script is reported as loaded:
Even though it's reported as installed, when bs4 checks for the module it says it's not available, and if I add it manually to my addon it also says that the module is not available:
Am I doing something wrong? Is it necessary for the module to be published in the official kodi repos to be used by other modules? I've been trying to find out, sieved through some 25 pages of forum searches, but I couldn't find an answer.
- The addons are mildly isolated, so dependencies must be explicitly declared. It is not necessary to reinstall the addon if you're developing, updating the addon.xml is enough if you already manually installed the dependency.
- The addon.xml/lib structure is not enough for some libraries. In the cases of soupsieve, or mechanize, you actually need the named subdirectory, so ./lib/soupsieve/* and ./lib/mechanize/* (hindsight 20/20, obvious in retrospect, read about python modules & packages for more info).
- In the example case at hand with BeautifulSoup4, there is already a pre-made 4.6.3 version on the repo-scripts matrix branch compatible with Python 3.
Original posts below
I was testing the latest nightly for Py3 addon compatibility and I incurred in a problem with BeautifulSoup where it required/complained about the need of the module soupsieve. I also had problems with other modules, but let's stick with that for a moment.
I took the module, created the directory structure, the appropriate addon.xml, zipped it together and installed it in Kodi. So far so good. Restarted for good measure, the script is reported as loaded:
log:NOTICE: ADDON: script.module.soupsieve v1.9.4 installed
Even though it's reported as installed, when bs4 checks for the module it says it's not available, and if I add it manually to my addon it also says that the module is not available:
log:ImportError: No module named soupsieve
Am I doing something wrong? Is it necessary for the module to be published in the official kodi repos to be used by other modules? I've been trying to find out, sieved through some 25 pages of forum searches, but I couldn't find an answer.