From: Thomas Petazzoni via buildroot <buildroot@buildroot.org>
To: Romain Naour <romain.naour@gmail.com>
Cc: Sebastian Weyer <sebastian.weyer@smile.fr>, buildroot@buildroot.org
Subject: Re: [Buildroot] [PATCH 1/4] support/testing: add python-mako runtime test
Date: Wed, 12 Jul 2023 21:46:13 +0200 [thread overview]
Message-ID: <20230712214613.32816a8f@windsurf> (raw)
In-Reply-To: <20230712214357.2e04f24d@windsurf>
On Wed, 12 Jul 2023 21:43:57 +0200
Thomas Petazzoni <thomas.petazzoni@bootlin.com> wrote:
> 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 ?
I got it wrong, your basic test shows that both pygments and markupsafe
are needed for a basic usage of python-mako:
$ ./support/testing/run-tests -o ../outputs/ -k tests.package.test_python_mako.TestPythonPy3Mako
21:32:04 TestPythonPy3Mako Starting
21:32:04 TestPythonPy3Mako Building
21:34:55 TestPythonPy3Mako Building done
21:35:01 TestPythonPy3Mako Cleaning up
F
======================================================================
FAIL: test_run (tests.package.test_python_mako.TestPythonPy3Mako)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/thomas/buildroot/buildroot/support/testing/tests/package/test_python.py", line 137, in test_run
self.run_sample_scripts()
File "/home/thomas/buildroot/buildroot/support/testing/tests/package/test_python.py", line 132, in run_sample_scripts
self.assertRunOk(cmd, timeout=self.timeout)
File "/home/thomas/buildroot/buildroot/support/testing/infra/basetest.py", line 95, in assertRunOk
self.assertEqual(
AssertionError: 1 != 0 :
Failed to run: python sample_python_mako.py
output was:
Traceback (most recent call last):
File "/usr/lib/python3.11/site-packages/mako/exceptions.py", line 287, in _install_highlighting
File "/usr/lib/python3.11/site-packages/mako/exceptions.py", line 271, in _install_pygments
File "/usr/lib/python3.11/site-packages/mako/ext/pygmentplugin.py", line 7, in <module>
ModuleNotFoundError: No module named 'pygments'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/root/sample_python_mako.py", line 1, in <module>
from mako import runtime
File "/usr/lib/python3.11/site-packages/mako/runtime.py", line 15, 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'
----------------------------------------------------------------------
Ran 1 test in 177.157s
FAILED (failures=1)
So to me it looks like the patch from Sebastian is correct, and
therefore your PATCH 2/4 adding an option to enable pygments support
does not make sense because pygments is needed unconditionally by
python-mako.
Thoughts?
Thomas
--
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
next prev parent reply other threads:[~2023-07-12 19:46 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-09 17:49 [Buildroot] [PATCH 1/4] support/testing: add python-mako runtime test Romain Naour
2023-06-09 17:49 ` [Buildroot] [PATCH 2/4] package/python-mako: add optionnal runtime dependency on python-pygments Romain Naour
2023-09-30 18:55 ` Thomas Petazzoni via buildroot
2023-06-09 17:49 ` [Buildroot] [PATCH 3/4] package/python-mako: add optionnal runtime dependency on python-babel Romain Naour
2023-09-30 18:55 ` Thomas Petazzoni via buildroot
2023-06-09 17:49 ` [Buildroot] [PATCH 4/4] support/testing: TestPythonPy3MakoExt: add a test for mako external plugin (pygmentsplugin, babel) Romain Naour
2023-09-30 18:55 ` Thomas Petazzoni via buildroot
2023-07-12 19:43 ` [Buildroot] [PATCH 1/4] support/testing: add python-mako runtime test Thomas Petazzoni via buildroot
2023-07-12 19:46 ` Thomas Petazzoni via buildroot [this message]
2023-07-13 7:36 ` Romain Naour
2023-07-13 7:42 ` Romain Naour
2023-07-13 9:43 ` Sebastian WEYER
2023-09-30 18:55 ` Thomas Petazzoni via buildroot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230712214613.32816a8f@windsurf \
--to=buildroot@buildroot.org \
--cc=romain.naour@gmail.com \
--cc=sebastian.weyer@smile.fr \
--cc=thomas.petazzoni@bootlin.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.