diff --git a/python-sphinxcontrib-htmlhelp.spec b/python-sphinxcontrib-htmlhelp.spec index 950cb88..762051d 100644 --- a/python-sphinxcontrib-htmlhelp.spec +++ b/python-sphinxcontrib-htmlhelp.spec @@ -1,8 +1,9 @@ %global pypi_name sphinxcontrib-htmlhelp -# when bootstrapping sphinx, we cannot run tests yet +# when bootstrapping sphinx, we cannot even run an import check +%bcond check 1 # RHEL does not include html5lib, without which the tests fail -%bcond check %{undefined rhel} +%bcond tests %[%{with check} && %{undefined rhel}] Name: python-%{pypi_name} Version: 2.0.0 @@ -21,10 +22,12 @@ BuildRequires: python%{python3_pkgversion}-devel BuildRequires: python%{python3_pkgversion}-setuptools %if %{with check} -BuildRequires: python%{python3_pkgversion}-pytest BuildRequires: python%{python3_pkgversion}-sphinx >= 1:2 +%if %{with tests} +BuildRequires: python%{python3_pkgversion}-pytest BuildRequires: python%{python3_pkgversion}-html5lib %endif +%endif %description sphinxcontrib-htmlhelp is a sphinx extension which renders HTML help files. @@ -71,8 +74,11 @@ popd %if %{with check} %check +%py3_check_import sphinxcontrib.htmlhelp +%if %{with tests} %{__python3} -m pytest %endif +%endif %files -n python%{python3_pkgversion}-%{pypi_name} -f sphinxcontrib.htmlhelp.lang