From 1f63bfc0bc08237d5db31fbace3c1795cfb90704 Mon Sep 17 00:00:00 2001 From: Yaakov Selkowitz Date: Wed, 17 May 2023 19:30:58 -0400 Subject: [PATCH] Disable docs by default in RHEL builds tox is unwanted in RHEL, and the documentation license is an issue. This is based on c9s: https://gitlab.com/redhat/centos-stream/rpms/scapy/-/commit/71b7e779d245611341d1bcb0c9bf611aa21d4af9 https://gitlab.com/redhat/centos-stream/rpms/scapy/-/commit/6239c6c2fcb09ba961f68b19f20c27d80cec2e7a --- scapy.spec | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/scapy.spec b/scapy.spec index 9ce6c5c..1ac8f49 100644 --- a/scapy.spec +++ b/scapy.spec @@ -32,11 +32,10 @@ requests and replies, and much more.} %bcond_with python2 %endif -# By default build the documentation -%if 0%{?fedora} || ( 0%{?rhel} && 0%{?rhel} >= 8 ) +# By default build the documentation only on Fedora due to cc-by-nc-sa license +%if 0%{?fedora} %bcond_without doc %else -# Documentation build fails on rhel7 due to version of sphinx %bcond_with doc %endif @@ -51,14 +50,18 @@ BuildRequires: sed %if 0%{?with_python2} BuildRequires: python2-devel BuildRequires: python2-setuptools +%if 0%{?with_doc} BuildRequires: python2-tox %endif +%endif %if 0%{?with_python3} BuildRequires: python%{python3_pkgversion}-devel BuildRequires: python%{python3_pkgversion}-setuptools +%if 0%{?with_doc} BuildRequires: python%{python3_pkgversion}-tox %endif +%endif # Recommends only supported on fedora and rhel8+ %if (0%{?fedora}) || ( 0%{?rhel} && 0%{?rhel} >= 8 )