From 1a4b58646cb19208bd3da50d0cfed08decec0e8a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Wed, 14 Jun 2023 19:47:00 +0200 Subject: [PATCH] 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 from html5lib import HTMLParser as _HTMLParser ModuleNotFoundError: No module named 'html5lib' But only with Python 3.12, not with Python 3.11. --- python-lxml.spec | 2 ++ 1 file changed, 2 insertions(+) diff --git a/python-lxml.spec b/python-lxml.spec index fb979e8..1cfcf6a 100644 --- a/python-lxml.spec +++ b/python-lxml.spec @@ -68,6 +68,8 @@ sed -i "s/, 'lxml.isoschematron'//" setup.py # Remove the doctests for it (the documentation is not shipped) # The command [d]eletes all lines from the first pattern to the second 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 %pyproject_buildrequires -x source%{?with_extras:,cssselect,html5,htmlsoup}