[Buildroot] [RFC] package/python-mako: build host-python-mako as python3 module for mesa3d build.

Romain Naour romain.naour at smile.fr
Sun Apr 14 20:24:08 UTC 2019


Hi Thomas, Arnout, All,

Le 13/04/2019 à 18:46, Romain Naour a écrit :
> Since a long time, it was not possible to build mesa3d from the git
> repository due to the missing dependency on host-python-mako package
> in mesa3d package.
> 
> python-mako module is used by a python script
> ir_expression_operation.py to build the header file
> ir_expression_operation_constant.h.
> 
> Hopefully when building mesa3d from a tarball release using the
> autotools build system, this header is alreay generated and the build
> continue.
> 
> But we are switching mesa3d package to meson build system that check
> unconditionnaly if the mako module for python3 interpreter is present.
> 
> Even by removing this check, the meson build system call
> ir_expression_operation.py script even if
> ir_expression_operation_constant.h is already generated.
> 
> The problem with host-python-mako and mesa3d is that we need to build
> mako module for python3 interpreter. Adding host-python-mako as mesa3d
> dependency is not enough since it can be build as host python2 module
> when BR2_PACKAGE_PYTHON3 is not selected for the target.
> 
> 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 ?
> 
> 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).
> 
> Signed-off-by: Romain Naour <romain.naour at smile.fr>
> Cc: Asaf Kahlon <asafka7 at gmail.com>
> Cc: Bernd Kuhls <bernd.kuhls at t-online.de>
> Cc: Thomas Petazzoni <thomas.petazzoni at bootlin.com>
> Cc: Yegor Yefremov <yegorslists at googlemail.com>
> ---

Actually it's easier to hack the mesa's meson build system than hacking the
python infra...

I have a small patch for mesa that allow to use generated files present in the
release archive (like autotools buils system does).

Best regards,
Romain


More information about the buildroot mailing list