From f47c6f8c6a8d8800f42824294d5b5ae197416208 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Mon, 11 Mar 2024 09:31:36 +0100 Subject: [PATCH] Add a bcond for gevent tests [skip changelog] --- python-zmq.spec | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/python-zmq.spec b/python-zmq.spec index f70b8ef..bf3b728 100644 --- a/python-zmq.spec +++ b/python-zmq.spec @@ -22,9 +22,16 @@ BuildRequires: pkgconfig(libzmq) BuildRequires: python%{python3_pkgversion}-devel BuildRequires: python%{python3_pkgversion}-pytest BuildRequires: python%{python3_pkgversion}-tornado -BuildRequires: python%{python3_pkgversion}-gevent BuildRequires: python%{python3_pkgversion}-numpy +# The gevent tests are automatically skipped when gevent is not installed. +# When bootstrapping new Python versions, gevent is often not available until very late. +# This bcond allows to ship zmq without gevent when needed. +%bcond gevent 1 +%if %{with gevent} +BuildRequires: python%{python3_pkgversion}-gevent +%endif + %description %{common_description}