Don't run html5lib tests --without extras

For unknown reason, the tests fail with:

    ...
      File "/builddir/build/BUILD/lxml-4.9.2/src/lxml/html/tests/test_html5parser.py", line 304, in call_it
        from lxml.html.html5parser import parse
      File "/builddir/build/BUILD/lxml-4.9.2/src/lxml/html/html5parser.py", line 7, in <module>
        from html5lib import HTMLParser as _HTMLParser
    ModuleNotFoundError: No module named 'html5lib'

But only with Python 3.12, not with Python 3.11.
This commit is contained in:
Miro Hrončok 2023-06-14 19:47:00 +02:00
parent a1fda59562
commit 1a4b58646c

View File

@ -68,6 +68,8 @@ sed -i "s/, 'lxml.isoschematron'//" setup.py
# Remove the doctests for it (the documentation is not shipped) # Remove the doctests for it (the documentation is not shipped)
# The command [d]eletes all lines from the first pattern to the second # The command [d]eletes all lines from the first pattern to the second
sed -Ei '/^Schematron$/,/^\(Pre-ISO-Schematron\)$/d' doc/validation.txt sed -Ei '/^Schematron$/,/^\(Pre-ISO-Schematron\)$/d' doc/validation.txt
# Don't run html5lib tests --without extras
%{!?without_extras:rm src/lxml/html/tests/test_html5parser.py}
%generate_buildrequires %generate_buildrequires
%pyproject_buildrequires -x source%{?with_extras:,cssselect,html5,htmlsoup} %pyproject_buildrequires -x source%{?with_extras:,cssselect,html5,htmlsoup}