public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Yaakov Selkowitz <yselkowi@redhat.com>
To: git-commits@fedoraproject.org
Subject: [rpms/python-license-expression] rawhide: Conditionalize docs
Date: Fri, 07 Aug 2026 03:18:02 GMT	[thread overview]
Message-ID: <178607268221.1.9319899662519804224.rpms-python-license-expression-894e430c3976@fedoraproject.org> (raw)

            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

                 reply	other threads:[~2026-08-07  3:18 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=178607268221.1.9319899662519804224.rpms-python-license-expression-894e430c3976@fedoraproject.org \
    --to=yselkowi@redhat.com \
    --cc=git-commits@fedoraproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox