Resolved: Python module addons
#1
I am at the stage in my project where I am trying to install it onto another machine to find out what libraries are missing in a clean Kodi install. I resolved the "future" lib issues pretty quickly by adding the dependency
   "<import addon="script.module.future" version="0.16.0.4"/>"
in the addon.xml. Now I am finding that import "typing" is missing. I don't see this module listed on https://kodi.wiki/view/Category:Add-on_l...es/modules, so perhaps it doesn't exist. Of course I don't have to have this module since it is just for type hinting, but it would be nice.

Am I looking in the right place? Should I expect each top-level import to have it's own module, or should I dig into git repositories? It took me a while to figure out that that the plugin name for the "future" lib is "script.module.future". How do I determine the version to specify in the addon.xml? For script.module.future I initially tried "0.1.1" which caused it to install 0.16.0.4, which I assume is the latest. Perhaps I should  always try that strategy.

Thanks
Reply
#2
I can't help on the typing module part, but the version number for any addon listed as a dependency is the minimum version required.  I'm like 92% sure Kodi will always install the most current one.  What I tend to do when developing is just grab the version number of the one I have on my development machine from the addon.xml for the particular module.  That's probably a horrible practice, but I figure there's less likely to be any backward compatibility issues that way.
Reply
#3
(2019-05-11, 01:42)pkscout Wrote: TI can't help on the typing module part, but the version number for any addon listed as a dependency is the minimum version required.  I'm like 92% sure Kodi will always install the most current one.  What I tend to do when developing is just grab the version number of the one I have on my development machine from the addon.xml for the particular module.  That's probably a horrible practice, but I figure there's less likely to be any backward compatibility issues that way.
Thanks for the insights.

If it would help, I could create the module. It looks pretty straight forward to do.
Reply
#4
I have resolved my issue. On closer inspection, the typing module is not used at runtime, further, it is considered somewhat experimental. Therefore, there is no compelling reason to create a Kodi module for it. I will simply create an exception wrapper around the import and definition of Type hints.
Reply

Logout Mark Read Team Forum Stats Members Help
Resolved: Python module addons0