* [Buildroot] [PATCH 1/1] package/python3: add optional support for lib2to3
@ 2021-01-03 15:03 Bernd Kuhls
2021-01-03 22:00 ` Yann E. MORIN
2021-01-05 22:37 ` Peter Korsgaard
0 siblings, 2 replies; 5+ messages in thread
From: Bernd Kuhls @ 2021-01-03 15:03 UTC (permalink / raw)
To: buildroot
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
python3: 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 python3 to fix the problem:
https://forum.libreelec.tv/thread/21239-lib2to3-pgen2-parse-missing/
https://github.com/LibreELEC/LibreELEC.tv/pull/4146
This patch provides the Config.in option to be used by Kodi 19.
Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
---
package/python3/Config.in | 5 +++++
package/python3/python3.mk | 7 ++++++-
2 files changed, 11 insertions(+), 1 deletion(-)
diff --git a/package/python3/Config.in b/package/python3/Config.in
index 7e19f84843..efc4dbb3d4 100644
--- a/package/python3/Config.in
+++ b/package/python3/Config.in
@@ -41,6 +41,11 @@ menu "core python3 modules"
comment "The following modules are unusual or require extra libraries"
+config BR2_PACKAGE_PYTHON3_2TO3
+ bool "2to3 module"
+ help
+ code translation from python 2 to 3
+
config BR2_PACKAGE_PYTHON3_BERKELEYDB
bool "berkeleydb"
select BR2_PACKAGE_BERKELEYDB
diff --git a/package/python3/python3.mk b/package/python3/python3.mk
index d200eecf76..de90b4a267 100644
--- a/package/python3/python3.mk
+++ b/package/python3/python3.mk
@@ -55,6 +55,12 @@ else
PYTHON3_CONF_OPTS += --disable-berkeleydb
endif
+ifeq ($(BR2_PACKAGE_PYTHON3_2TO3),y)
+PYTHON_CONF_OPTS += --enable-lib2to3
+else
+PYTHON_CONF_OPTS += --disable-lib2to3
+endif
+
ifeq ($(BR2_PACKAGE_PYTHON3_READLINE),y)
PYTHON3_DEPENDENCIES += readline
else
@@ -162,7 +168,6 @@ PYTHON3_CONF_OPTS += \
--with-system-ffi \
--disable-pydoc \
--disable-test-modules \
- --disable-lib2to3 \
--disable-tk \
--disable-nis \
--disable-idle3 \
--
2.29.2
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [Buildroot] [PATCH 1/1] package/python3: add optional support for lib2to3
2021-01-03 15:03 [Buildroot] [PATCH 1/1] package/python3: add optional support for lib2to3 Bernd Kuhls
@ 2021-01-03 22:00 ` Yann E. MORIN
2021-01-04 21:29 ` Bernd Kuhls
2021-01-05 22:37 ` Peter Korsgaard
1 sibling, 1 reply; 5+ messages in thread
From: Yann E. MORIN @ 2021-01-03 22:00 UTC (permalink / raw)
To: buildroot
Bernd, All,
On 2021-01-03 16:03 +0100, Bernd Kuhls spake thusly:
> 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
> python3: 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 python3 to fix the problem:
> https://forum.libreelec.tv/thread/21239-lib2to3-pgen2-parse-missing/
> https://github.com/LibreELEC/LibreELEC.tv/pull/4146
>
> This patch provides the Config.in option to be used by Kodi 19.
>
> Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
Applied to master, thanks.
However, I had to do a few fixes;
- fix conflicts due to local changes in author's tree
- fix typ in variabl name (PYTHON_CONF_OPTS -> PYTHON3_CONF_OPTS)
Please be carefull when you send patches: rebase them on master before
sending (see below).
Also, run: make check-package, that will hint at the variable typo I had
to fix too.
> ---
> package/python3/Config.in | 5 +++++
> package/python3/python3.mk | 7 ++++++-
> 2 files changed, 11 insertions(+), 1 deletion(-)
>
> diff --git a/package/python3/Config.in b/package/python3/Config.in
> index 7e19f84843..efc4dbb3d4 100644
> --- a/package/python3/Config.in
> +++ b/package/python3/Config.in
> @@ -41,6 +41,11 @@ menu "core python3 modules"
>
> comment "The following modules are unusual or require extra libraries"
>
> +config BR2_PACKAGE_PYTHON3_2TO3
> + bool "2to3 module"
> + help
> + code translation from python 2 to 3
> +
> config BR2_PACKAGE_PYTHON3_BERKELEYDB
We do not have that in master, so the patch did not apply cleanly...
Will you send support for the bdb module?
Regards,
Yann E. MORIN.
> bool "berkeleydb"
> select BR2_PACKAGE_BERKELEYDB
> diff --git a/package/python3/python3.mk b/package/python3/python3.mk
> index d200eecf76..de90b4a267 100644
> --- a/package/python3/python3.mk
> +++ b/package/python3/python3.mk
> @@ -55,6 +55,12 @@ else
> PYTHON3_CONF_OPTS += --disable-berkeleydb
> endif
>
> +ifeq ($(BR2_PACKAGE_PYTHON3_2TO3),y)
> +PYTHON_CONF_OPTS += --enable-lib2to3
> +else
> +PYTHON_CONF_OPTS += --disable-lib2to3
> +endif
> +
> ifeq ($(BR2_PACKAGE_PYTHON3_READLINE),y)
> PYTHON3_DEPENDENCIES += readline
> else
> @@ -162,7 +168,6 @@ PYTHON3_CONF_OPTS += \
> --with-system-ffi \
> --disable-pydoc \
> --disable-test-modules \
> - --disable-lib2to3 \
> --disable-tk \
> --disable-nis \
> --disable-idle3 \
> --
> 2.29.2
>
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot
--
.-----------------.--------------------.------------------.--------------------.
| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ |
| +33 561 099 427 `------------.-------: X AGAINST | \e/ There is no |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |
'------------------------------^-------^------------------^--------------------'
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Buildroot] [PATCH 1/1] package/python3: add optional support for lib2to3
2021-01-03 22:00 ` Yann E. MORIN
@ 2021-01-04 21:29 ` Bernd Kuhls
0 siblings, 0 replies; 5+ messages in thread
From: Bernd Kuhls @ 2021-01-04 21:29 UTC (permalink / raw)
To: buildroot
Hi Yann,
Am Sun, 03 Jan 2021 23:00:33 +0100 schrieb Yann E. MORIN:
> Please be carefull when you send patches: rebase them on master before
> sending (see below).
oops, sorry.
>> config BR2_PACKAGE_PYTHON3_BERKELEYDB
>
> We do not have that in master, so the patch did not apply cleanly...
>
> Will you send support for the bdb module?
http://patchwork.ozlabs.org/project/buildroot/patch/
20200411201132.249731-1-bernd.kuhls at t-online.de/
Regards, Bernd
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Buildroot] [PATCH 1/1] package/python3: add optional support for lib2to3
2021-01-03 15:03 [Buildroot] [PATCH 1/1] package/python3: add optional support for lib2to3 Bernd Kuhls
2021-01-03 22:00 ` Yann E. MORIN
@ 2021-01-05 22:37 ` Peter Korsgaard
2021-01-06 6:30 ` Bernd Kuhls
1 sibling, 1 reply; 5+ messages in thread
From: Peter Korsgaard @ 2021-01-05 22:37 UTC (permalink / raw)
To: buildroot
>>>>> "Bernd" == Bernd Kuhls <bernd.kuhls@t-online.de> writes:
> 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
> python3: 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 python3 to fix the problem:
> https://forum.libreelec.tv/thread/21239-lib2to3-pgen2-parse-missing/
> https://github.com/LibreELEC/LibreELEC.tv/pull/4146
> This patch provides the Config.in option to be used by Kodi 19.
Above you mention kodi 18, but here kodi 19? Is this only needed for
Kodi 19 or should it also be backported to 2020.02.x / 2020.11.x?
--
Bye, Peter Korsgaard
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Buildroot] [PATCH 1/1] package/python3: add optional support for lib2to3
2021-01-05 22:37 ` Peter Korsgaard
@ 2021-01-06 6:30 ` Bernd Kuhls
0 siblings, 0 replies; 5+ messages in thread
From: Bernd Kuhls @ 2021-01-06 6:30 UTC (permalink / raw)
To: buildroot
Am Tue, 05 Jan 2021 23:37:11 +0100 schrieb Peter Korsgaard:
> Above you mention kodi 18, but here kodi 19? Is this only needed for
> Kodi 19 or should it also be backported to 2020.02.x / 2020.11.x?
Hi Peter,
backporting this patch is not necessary as kodi19 (which depends on
python3) will imho never be backported to older buildroot versions.
For kodi18 (which depends on python2) a similar patch was already
committed: https://git.buildroot.net/buildroot/commit/package/python?
id=480e926db42b8df6d55de5c08a470a501910f6a8
Regards, Bernd
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2021-01-06 6:30 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-01-03 15:03 [Buildroot] [PATCH 1/1] package/python3: add optional support for lib2to3 Bernd Kuhls
2021-01-03 22:00 ` Yann E. MORIN
2021-01-04 21:29 ` Bernd Kuhls
2021-01-05 22:37 ` Peter Korsgaard
2021-01-06 6:30 ` Bernd Kuhls
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox