public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/python-license-expression] rawhide: Conditionalize docs
@ 2026-08-07 3:18 Yaakov Selkowitz
0 siblings, 0 replies; only message in thread
From: Yaakov Selkowitz @ 2026-08-07 3:18 UTC (permalink / raw)
To: git-commits
A new commit has been pushed.
Repo : rpms/python-license-expression
Branch : rawhide
Commit : 894e430c3976bf98897509259e56311b1d63f970
Author : Yaakov Selkowitz <yselkowi@redhat.com>
Date : 2026-08-06T22:36:10-04:00
Stats : +11/-0 in 1 file(s)
URL : https://src.fedoraproject.org/rpms/python-license-expression/c/894e430c3976bf98897509259e56311b1d63f970?branch=rawhide
Log:
Conditionalize docs
python-sphinxcontrib-apidoc is not included in RHEL.
---
diff --git a/python-license-expression.spec b/python-license-expression.spec
index 96fe7d3..e7959d0 100644
--- a/python-license-expression.spec
+++ b/python-license-expression.spec
@@ -1,3 +1,6 @@
+# sphinxcontrib-apidoc is not included in RHEL
+%bcond docs %{undefined rhel}
+
Name: python-license-expression
Version: 30.4.4
Release: %autorelease
@@ -11,9 +14,11 @@ Source: %url/archive/v%{version}/license-expression-%{version}.tar.gz
BuildArch: noarch
BuildRequires: python3-devel
BuildRequires: python3dist(pytest)
+%if %{with docs}
BuildRequires: python3dist(sphinx)
BuildRequires: python3dist(sphinxcontrib-apidoc)
BuildRequires: python3dist(sphinx-rtd-theme)
+%endif
%global common_description %{expand:
This module defines a mini language to parse, validate, simplify, normalize and
@@ -32,6 +37,7 @@ Summary: %{summary}
%description -n python3-license-expression %{common_description}
+%if %{with docs}
%package -n python-license-expression-doc
Summary: Documentation for python-license-expression
# BSD-2-Clause: Sphinx javascript
@@ -49,6 +55,7 @@ Provides: bundled(js-searchtools)
%{common_description}
This package is providing the documentation for license-expression.
+%endif
%prep
%autosetup -p1 -n license-expression-%{version}
@@ -66,10 +73,12 @@ sed -i '/sphinx_copybutton/d' docs/source/conf.py
%build
%pyproject_wheel
+%if %{with docs}
# generate html docs
sphinx-build-3 -b html docs/source html
# remove the sphinx-build-3 leftovers
rm -rf html/.{doctrees,buildinfo}
+%endif
%install
%pyproject_install
@@ -81,8 +90,10 @@ rm -rf html/.{doctrees,buildinfo}
%files -n python3-license-expression -f %{pyproject_files}
%doc AUTHORS.rst CHANGELOG.rst CODE_OF_CONDUCT.rst README.rst
+%if %{with docs}
%files -n python-license-expression-doc
%doc html
+%endif
%changelog
%autochangelog
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-08-07 3:18 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-08-07 3:18 [rpms/python-license-expression] rawhide: Conditionalize docs Yaakov Selkowitz
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox