Migrate xbmc2 to 3
#1
I am starting to develop addon for kivy, I have migrated xbmcswift2 to work with python 3 but I have a question, when an addon that requires xbmcswift3 is installed it needs a script script.module.xbmcswift3, how should I generate this module? should it go up to pypi?
Reply
#2
well.. xbmcswift2 has already been ported to py3 and is available from our addon repo...
Do not PM or e-mail Team-Kodi members directly asking for support.
Always read the Forum rules, Kodi online-manual, FAQ, Help and Search the forum before posting.
Reply
#3
I'm a bit confused, I installed xbmcswift2 "pip imstall xbmcswift2" and I got errors because it had old python code, by this I mean the pars development repository, when I install in kodi addons developed with xbmcswift2 script.modulo.swift2 is installed and The module does not give problems, https://github.com/jbeluch/xbmcswift2, this repository has a mock that is very interesting for the development of addons, I have a question, how are the scripts installed? do they have to be in the kodi tv repositories?
Reply
#4
(2020-09-25, 02:01)Francisco Jose Wrote: I'm a bit confused, I installed xbmcswift2 "pip imstall xbmcswift2" and I got errors because it had old python code, by this I mean the pars development repository, when I install in kodi addons developed with xbmcswift2 script.modulo.swift2 is installed and The module does not give problems, https://github.com/jbeluch/xbmcswift2, this repository has a mock that is very interesting for the development of addons, I have a question, how are the scripts installed? do they have to be in the kodi tv repositories?
Kodi isolates the Python environment (and on some platforms has it's own Python environment entirely), so the only Python modules you can use are the core ones plus ones that are installed as Kodi addons.  If you are using pip to install modules, those won't be available in Kodi. To use an external module in an addon, it has to be included in the "requires" section of the addon.xml. That will install it (if it isn't there already) and make it available to the addon to use.
Reply
#5
Why are there repositories of libraries that already exist? eg script.module.beautifulsoup4, this repository already exists in github, but in the addon.xml script.module.beautifulsoup4 is imported and not the original repository, why is this done?
Reply
#6
Please rephrase the question.
Reply
#7
beautifulsoup4 exists on github, why is another one called script.module.beautifulsoup4 created?
Reply
#8
GitHub is a source code hosting and has nothing to do with an installation package distribution system. For generic Python the main package distribution system is PyPI with pip as a command line client. Distributable Python packages are hosted on PyPI in different forms (tar.gz, wheels) but source code for those packages can be hosted at various source code hosting providers - GitHub, GitLab, BitBucket, self-hosted reps etc. PyPI is not the only package distribution system for Python, there are alternative ones, like Anaconda with conda as a command line client.
Kodi uses its own homegrown installation package distribution system in form of addons. So any Python library or a program needs to be packaged as a Kodi addon and hosted in a Kodi addons repo to be available for installing from Kodi ether as a primary addon or as a library dependency.
Reply
#9
Thanks, this is what I wanted to know, for a script to be installed in kodi, it must be inside the official kodi repository
Reply

Logout Mark Read Team Forum Stats Members Help
Migrate xbmc2 to 30