[Buildroot] [PATCH] package/python3: fix install

Thomas Petazzoni thomas.petazzoni at bootlin.com
Thu Feb 8 08:01:20 UTC 2024


Hello Roy,

On Thu,  8 Feb 2024 08:49:00 +0100
Roy Kollen Svendsen <roykollensvendsen at gmail.com> wrote:

> diff --git a/package/python3/python3.mk b/package/python3/python3.mk
> index 42765abcf4..81d9a904c7 100644
> --- a/package/python3/python3.mk
> +++ b/package/python3/python3.mk
> @@ -34,6 +34,7 @@ HOST_PYTHON3_CONF_OPTS += \
>  HOST_PYTHON3_CONF_ENV += \
>  	LDFLAGS="$(HOST_LDFLAGS) -Wl,--enable-new-dtags" \
>  	py_cv_module_nis=n/a \
> +	py_cv_module__tkinter=n/a \
>  	py_cv_module_unicodedata=yes \
>  	py_cv_module__codecs_cn=n/a \
>  	py_cv_module__codecs_hk=n/a \

Thanks a lot for your patch! However, in order to be consistent with
how we do it with ncurses, sqlite, etc, I think it is the --disable-tk
option that should automatically set py_cv_module__tkinter=n/a.

+AC_SUBST(TK)
+AC_ARG_ENABLE(tk,
+       AS_HELP_STRING([--disable-tk], [disable tk]),
+       [ TK="${enableval}" ], [ TK=yes ])

should be followed by something like

AS_IF([test "${enable_tk}" = "no"], [PY_STDLIB_MOD_SET_NA([_tkinter])])

something like this (in
package/python3/0012-Add-an-option-to-disable-the-tk-module.patch).

Or, we need to turn around how things are done, and instead of adding
those --enable/--disable, look at whether py_cv_module_<foo> is passed
to appropriately disable things. Might be more upstreamable (but I
thought about this idea *after* redoing the 3.12 patches).

That said, the 3.12 bump is for now causing quite a few issues, so it
is not impossible that we revert it before the 2024.02 release.

Best regards,

Thomas
-- 
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com



More information about the buildroot mailing list