[Buildroot] [RFC] package/python-mako: build host-python-mako as python3 module for mesa3d build.
thomas.petazzoni at bootlin.com
Sat Apr 13 16:54:07 UTC 2019
On Sat, 13 Apr 2019 18:46:06 +0200
Romain Naour <romain.naour at smile.fr> wrote:
> But adding python3 on the target in order to have a python3 module
> on the host is not nice.
> To build host-python-mako as python3 module we can add this line
> in pyhon-mako package:
> HOST_PYTHON_MAKO_NEEDS_HOST_PYTHON = python3
> But python mako is not available anymore for python2 interpreter.
> The problem is more global, how can we build the same python
> module for python2 and/or python3 on the host ?
We can't :-)
> Mako module is also used by gnuradio build system and building
> this module for python3 for mesa3d can eventually break the build of
> gnuradio when the python interpreter on the host is python2
> (to be tested).
Indeed, your patch would break situations where mesa3d is enabled, but
another package needs host-python-mako for python2 (and not python3).
We solved this problem for python-setuptools by having
host-python-setuptools and host-python3-setuptools as separate
packages. It's not great, but we don't have any other good solution for
this at the moment I believe.
Alternatively, perhaps for host Python modules we should always install
them for both host-python and host-python3 (if both are enabled, of
course). The gotcha is that since we don't have any Config.in options
for host packages, how can we know if host-python and/or host-python3
are enabled ?
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
More information about the buildroot