From 20ac7fe0c368dd3b643a8329a13adddd6ded92f5 Mon Sep 17 00:00:00 2001 From: Ken Dreyer Date: Mar 13 2024 00:04:47 +0000 Subject: conditionally disable docs on el9 This removes the dependency on python3-zmq, which also pulls in zeromq. This makes it easier to bootstrap this package in minimal environments where zeromq is not necessary. --- diff --git a/python-eventlet.spec b/python-eventlet.spec index d2e46c0..b8ff01d 100644 --- a/python-eventlet.spec +++ b/python-eventlet.spec @@ -8,7 +8,12 @@ io operations appear blocking at the source code level.} # RHEL9 doesn't have nose, and it won't be added to EPEL9 because it's # abandoned upstream (and deprecated in Fedora). # https://bugzilla.redhat.com/show_bug.cgi?id=2041068 -%if %{undefined el9} +# and the docs require zmq/zeromq. +%if 0%{?rhel} +%bcond_with docs +%bcond_with tests +%else +%bcond_without docs %bcond_without tests %endif @@ -39,6 +44,7 @@ BuildRequires: python3-pyOpenSSL %description -n python3-%{srcname} %{_description} +%if %{with docs} %package -n python3-%{srcname}-doc Summary: Documentation for python3-%{srcname} BuildRequires: make @@ -47,6 +53,7 @@ BuildRequires: python3-zmq %description -n python3-%{srcname}-doc %{summary}. +%endif %prep %autosetup -p1 -n %{srcname}-%{version} @@ -56,7 +63,9 @@ BuildRequires: python3-zmq %build %pyproject_wheel +%if %{with docs} %make_build -C doc html +%endif %install %pyproject_install @@ -74,9 +83,11 @@ nosetests-%{python3_version} -v -e greendns_test -e socket_test -e test_patcher_ %files -n python3-%{srcname} -f %{pyproject_files} %doc README.rst AUTHORS NEWS +%if %{with docs} %files -n python3-%{srcname}-doc %license LICENSE %doc doc/_build/html +%endif %changelog * Fri Jan 26 2024 Fedora Release Engineering - 0.33.3-5