Manage addon dependencies with pypi packages
#1
Writing my first addon and need opencv lib to reach my goal. I was wondering if it's possible to manage dependencies in the usual way we do with python.

By usual I mean, with a pyproject.toml pointing to Pypi packages, ...

I saw one way documented is to repackage the lib for kodi but that sounded weird/painful to me, as this will require to repackage a lot of thing the day I will use a lib having their own dependencies too....
Reply
#2
No, you can't use pypi (or any other package manager) to manage dependencies.  Python modules have to be repackaged as Kodi addons to use them within Kodi.  It doesn't look like OpenCV has been repackaged, so you'd have to do that.  And if OpenCV has any dependencies that aren't already repackaged, you'd have to repackage those as well.

If you're on a Linux variance and doing this for yourself, I think Kodi uses the OS python interpreter, and I believe (although I've never done it) there's a way to get Kodi to use any built in packages you have.  You just can't do it that way if you want to submit the addon to the official Kodi addon repo.
Reply

Logout Mark Read Team Forum Stats Members Help
Manage addon dependencies with pypi packages0