From 18ea04d057760a3355fe0fceb0f2a376271ff0dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Sun, 26 May 2024 01:18:20 +0200 Subject: [PATCH] Make the build dependency on trio optional (cherry picked from commit 0aec2152b2acae1d1a1ab75ab1e951de15fdc2a1) --- python-jinja2.spec | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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}