Resolved: Python module addons - Printable Version +- Kodi Community Forum (https://forum.kodi.tv) +-- Forum: Development (https://forum.kodi.tv/forumdisplay.php?fid=32) +--- Forum: Add-ons (https://forum.kodi.tv/forumdisplay.php?fid=26) +---- Forum: Python 3 migration (https://forum.kodi.tv/forumdisplay.php?fid=281) +---- Thread: Resolved: Python module addons (/showthread.php?tid=343779) |
Resolved: Python module addons - fbacher - 2019-05-11 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_libraries/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 RE: Python module addons - pkscout - 2019-05-11 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. RE: Python module addons - fbacher - 2019-05-11 (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. RE: Python module addons - fbacher - 2019-05-11 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. |