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}