package/python: add optional support for lib2to3
authorBernd Kuhls <bernd.kuhls@t-online.de>
Sat, 22 Feb 2020 18:54:59 +0000 (19:54 +0100)
committerThomas Petazzoni <thomas.petazzoni@bootlin.com>
Sun, 15 Mar 2020 15:07:45 +0000 (16:07 +0100)
commit480e926db42b8df6d55de5c08a470a501910f6a8
tree30fbcf618f7b8020109021ed39f18f10b26b8beb
parent26293479c4baa48c1524d4be215e8e927c744714
package/python: add optional support for lib2to3

Kodi is in transition to support python3 instead of python2:
https://kodi.wiki/view/General_information_about_migration_to_Python_3

"For Kodi 18 (Leia), only addons that are compatible with both Python 2
 and 3 will be accepted to the official addon repository."

Some of these addons depend on the Kodi addon script.module.future to
provide support for both python versions.

The script.module.future addon contains python-future:
https://kodi.wiki/view/General_information_about_migration_to_Python_3#Future
which in turn needs lib2to3 to be included in the target build of
python2: http://python-future.org/automatic_conversion.html

Kodi addons depending on the script.module.future addon are crashing on
buildroot due to lib2to3 missing in the build.

LibreELEC added lib2to3 to python2 to fix the problem:
https://forum.libreelec.tv/thread/21239-lib2to3-pgen2-parse-missing/
https://github.com/LibreELEC/LibreELEC.tv/pull/4147

This patch provides the Config.in option to be used by Kodi.

Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
package/python/Config.in
package/python/python.mk