diff --git a/python-jinja2.spec b/python-jinja2.spec index f839822..e81c6a4 100644 --- a/python-jinja2.spec +++ b/python-jinja2.spec @@ -15,6 +15,8 @@ Source0: %{pypi_source %srcname} %else %bcond_without docs %endif +# The dependency on trio is undesired on RHEL +%bcond asyncio_tests %{undefined rhel} BuildArch: noarch @@ -35,6 +37,9 @@ environments.} Summary: %{summary} BuildRequires: python3-devel BuildRequires: python3-pytest +%if %{with asyncio_tests} +BuildRequires: python3-trio +%endif %if %{with docs} BuildRequires: %{_bindir}/sphinx-build-3 BuildRequires: make @@ -73,7 +78,7 @@ rm -rvf docs/_build/html/.buildinfo %check -%pytest tests +%pytest tests %{!?with_asyncio_tests:--ignore tests/test_async.py --ignore tests/test_async_filters.py} %files -n python3-jinja2 -f %{pyproject_files}