Kodi Community Forum

Full Version: How to compile Kodi v18 (Leia) with Python 3 support
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
In the compile how to documentation in Leia there is no mention at all about how to compile it using Python 3.

I would be interested in such a subject. Any pointer?

Thanks.
I don't think that's an option (at least not anymore).  I vaguely recall (and might be wrong) very, very early in the Kodi19 development there were options to build Kodi18 with Python3, but that was just an interim thing until Kodi19 was stable enough for testing.  I think the only option now for Python3 support is to build Kodi19 (or use one of the nightly builds).
I see. Thank you.
(2020-04-01, 03:41)jcea Wrote: [ -> ]In the compile how to documentation in Leia there is no mention at all about how to compile it using Python 3.

I would be interested in such a subject. Any pointer?

Thanks.

I've built the Kodi 18 Leia version in Fedora 32 with Python 3 support. You can either use Fedora or grab the patch I used to build the package and compile your own.

http://koji.rpmfusion.org/koji/buildinfo?buildID=14442

https://pkgs.rpmfusion.org/cgit/free/kod...0001.patch
https://pkgs.rpmfusion.org/cgit/free/kod...0002.patch

Edit: After testing I found I needed to tweak the patchset to fix an exit crasher. This third patch has Kodi 18 using Python 3 pretty well. Updated packages for Fedora 32 and Rawhide are being built.

https://pkgs.rpmfusion.org/cgit/free/kod...0003.patch

http://koji.rpmfusion.org/koji/buildinfo?buildID=15031
WHY??. This build is 100% useless as it has xbmc.python compat at 2.1.0 and install addons from the Leia repo which are meant for py2. Even if you somehow fix it to have xbmc.python 3.0.0 you will need to backport ALL the changes in matrix for addons to work properly. Distros should not add useless patches that break upstream.

I use Arch LInux BTW.
fedora users will be happy to have almost all  a lot of addons broken
Not to mention that such a kodi binary is unsupported here
(2020-05-03, 20:57)V8MEM Wrote: [ -> ]WHY??. This build is 100% useless as it has xbmc.python compat at 2.1.0 and install addons from the Leia repo which are meant for py2. Even if you somehow fix it to have xbmc.python 3.0.0 you will need to backport ALL the changes in matrix for addons to work properly. Distros should not add useless patches that break upstream.

I use Arch LInux BTW.

https://fedoraproject.org/wiki/Changes/RetirePython2
(2020-05-04, 21:47)mooninite Wrote: [ -> ]
(2020-05-03, 20:57)V8MEM Wrote: [ -> ]WHY??. This build is 100% useless as it has xbmc.python compat at 2.1.0 and install addons from the Leia repo which are meant for py2. Even if you somehow fix it to have xbmc.python 3.0.0 you will need to backport ALL the changes in matrix for addons to work properly. Distros should not add useless patches that break upstream.

I use Arch LInux BTW.

https://fedoraproject.org/wiki/Changes/RetirePython2 
That page would seem to indicate Kodi 18 is fine. It uses it's own internal Python 2.7 package, which is specifically called out in the link you provided.

https://fedoraproject.org/wiki/Changes/R...27_package

Look, we should definitely get Kodi to Python3, but Kodi 19 is that path.  If someone has time to try and recompile Kodi 18 with Python3 support, backport the changes to get it working, and manage a set of addon repos specifically for Python3 packages for Kodi 18, then maybe, just maybe, they have time to help get Kodi 19 out the door.