[Buildroot] [PATCH 1/4] support/testing: add python-mako runtime test

Thomas Petazzoni thomas.petazzoni at bootlin.com
Wed Jul 12 19:43:57 UTC 2023


Hello Romain,

On Fri,  9 Jun 2023 19:49:52 +0200
Romain Naour <romain.naour at gmail.com> wrote:

> This new runtime test allows to reproduce the issue
> reported by https://bugs.busybox.net/show_bug.cgi?id=15628
> with a simple python script.
> 
> Traceback (most recent call last):
>   File "/bin/piglit", line 107, in <module>
>     import framework.programs.summary as summary
>   File "/usr/lib64/piglit/framework/programs/summary.py", line 30, in <module>
>     from framework import summary, status, core, backends, exceptions
>   File "/usr/lib64/piglit/framework/summary/__init__.py", line 31, in <module>
>     from .html_ import html, feat
>   File "/usr/lib64/piglit/framework/summary/html_.py", line 37, in <module>
>     from mako.lookup import TemplateLookup
>   File "/usr/lib/python3.11/site-packages/mako/lookup.py", line 13, in <module>
>   File "/usr/lib/python3.11/site-packages/mako/exceptions.py", line 292, in <module>
>   File "/usr/lib/python3.11/site-packages/mako/exceptions.py", line 289, in _install_highlighting
>   File "/usr/lib/python3.11/site-packages/mako/exceptions.py", line 277, in _install_fallback
>   File "/usr/lib/python3.11/site-packages/mako/filters.py", line 14, in <module>
> ModuleNotFoundError: No module named 'markupsafe
> 
> Signed-off-by: Romain Naour <romain.naour at gmail.com>

I'm unclear on a number of things:

- How does this interact with the patch proposed by Sebastian at
  https://patchwork.ozlabs.org/project/buildroot/patch/20230608140933.1814667-1-sebastian.weyer@smile.fr/,
  which takes a different approach ?

- How does your patch series fixes bug #15628 ? The patch from
  Sebastian fixes it, but not your series as far as I can see.

- I don't see in your series what ensures that the test
  TestPythonPy3Mako properly works. It would work with Sebastian patch
  applied, but Sebastian's patch collides with your series because
  Sebastian patch makes BR2_PACKAGE_PYTHON_PYGMENTS a mandatory
  dependency of python-mako, while your patch series makes it an
  optional dependency, enabled when
  BR2_PACKAGE_PYTHON_MAKO_EXT_PYGMENTPLUGIN is enabled.

I might not have grasped the full scale of the issue, but my feeling is
that:

- python-mako needs markupsafe unconditionally, as demonstrated by your
  test TestPythonPy3Mako. So python-mako should unconditionally select
  BR2_PACKAGE_PYTHON_MARKUPSAFE

- python-mako only needs pygments/babel as optional dependencies so
  your patches 2/4 and 3/4 are fine

- in order to fix bug #15628, we need to ensure that the piglit package
  selects BR2_PACKAGE_PYTHON_MAKO_EXT_PYGMENTPLUGIN, so that
  python-mako is installed with pygments support

Does that make sense ?

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