ec59698
%global owner michaeljones
ec59698
%global srcname breathe
ec59698
%global _description \
ec59698
Breathe is an extension to reStructuredText and Sphinx to be able to read and \
ec59698
render the Doxygen xml output.
ec59698
a055bb0
# This is buildroot only in RHEL, and building the docs pulls in unwanted dependencies
a055bb0
%bcond doc %{undefined rhel}
a055bb0
ec59698
Name:           python-%{srcname}
e1864f5
Version:        4.35.0
98b1ad1
Release:        %autorelease
ec59698
Summary:        Adds support for Doxygen xml output to reStructuredText and Sphinx
ec59698
00b7ecb
License:        BSD-3-Clause
ec59698
URL:            https://github.com/%{owner}/%{srcname}
04ec8d6
Source0:        %{URL}/archive/v%{version}.tar.gz
6611c07
Source1:        %{URL}/releases/download/v%{version}/%{srcname}-%{version}.tar.gz.sig
6611c07
Source2:        https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x8aed58021feacdd5f27ba0e6a72f627716ea9d96#./vermware.key
cc76bbe
# Patch1 first hunk was truncated
cc76bbe
Patch1:         https://github.com/breathe-doc/breathe/pull/956.patch
cc76bbe
# Patch2 is a better fix of first hunk of Path1
cc76bbe
Patch2:         https://github.com/breathe-doc/breathe/pull/964.patch
16b05ba
ec59698
BuildArch:      noarch
ec59698
93bda10
BuildRequires:  doxygen >= 1.8.4
b1dc3e7
BuildRequires:  python%{python3_pkgversion}-devel
b1dc3e7
BuildRequires:  python%{python3_pkgversion}-setuptools
93bda10
BuildRequires:  %{py3_dist six} >= 1.9
6d603e4
%if 0%{?rhel}
6d603e4
BuildRequires:  %{py3_dist Sphinx}
6d603e4
%else
e1864f5
# Sphinx>=4.0,!=5.0.0
e1864f5
BuildRequires:  ((%{py3_dist Sphinx} >= 4.0 and %{py3_dist Sphinx} < 5.0.0) or %{py3_dist Sphinx} > 5.0.0)
6d603e4
%endif
93bda10
BuildRequires:  %{py3_dist docutils} >= 0.12
cc8e910
BuildRequires:  %{py3_dist Jinja2} >= 2.7.3
cc8e910
BuildRequires:  %{py3_dist MarkupSafe} >= 0.23
cc8e910
BuildRequires:  %{py3_dist Pygments} >= 1.6
c8076a7
BuildRequires:  %{py3_dist pytest}
a055bb0
%if %{with doc}
e1864f5
BuildRequires:  %{py3_dist sphinx-copybutton}
e1864f5
BuildRequires:  %{py3_dist furo}
a055bb0
%endif
ec59698
# NOTE: git is only needed because part of the build process checks if it's in
ec59698
# a git repo
ec59698
BuildRequires:  git
32f60c3
BuildRequires:  make
6611c07
BuildRequires:  gnupg2
ec59698
ec59698
# Set the name of the documentation directory
ec59698
%global _docdir_fmt %{name}
ec59698
ec59698
%description %_description
ec59698
Orion Poplawski fc02551
%package -n     python%{python3_pkgversion}-%{srcname}
ec59698
Summary:        %{summary}
Orion Poplawski b193fc2
Requires:       python%{python3_pkgversion}-six
93bda10
Requires:       doxygen >= 1.8.4
Orion Poplawski fc02551
%{?python_provide:%python_provide python%{python3_pkgversion}-%{srcname}}
ec59698
Orion Poplawski fc02551
%description -n python%{python3_pkgversion}-%{srcname} %_description
ec59698
db999e0
%package        doc
db999e0
Summary:        Documentation files for %{srcname}
ec59698
# tinyxml uses zlib license
00b7ecb
License:        BSD-3-Clause AND Zlib
ec59698
db999e0
%description    doc
db999e0
This package contains documentation for developer documentation for %{srcname}.
ec59698
ec59698
%prep
6611c07
%{gpgverify} --keyring='%{SOURCE2}' --signature='%{SOURCE1}' --data='%{SOURCE0}'
ae563f1
%autosetup -n %{srcname}-%{version} -p1
ec59698
ec59698
%build
ec59698
%py3_build
a055bb0
%if %{with doc}
ec59698
# Build the documentation
df448ef
# Remove -W (turn warnings into errors) from SPHINXOPTS to fix the build for f39
df448ef
%make_build SPHINXOPTS="-v -E" DOXYGEN=$(which doxygen) PYTHONPATH=$(pwd) html
ec59698
# Remove temporary build files
db999e0
rm documentation/build/html/.buildinfo
a055bb0
%endif
ec59698
ec59698
%install
ec59698
%py3_install
ec59698
93bda10
%check
32f60c3
%make_build dev-test
93bda10
Orion Poplawski fc02551
%files -n python%{python3_pkgversion}-%{srcname}
93bda10
%doc README.rst
ec59698
%{_bindir}/breathe-apidoc
ec59698
%{python3_sitelib}/*
ec59698
%license LICENSE
ec59698
a055bb0
%if %{with doc}
db999e0
%files doc
db999e0
%doc documentation/build/html
db999e0
%license LICENSE
a055bb0
%endif
ec59698
ec59698
%changelog
98b1ad1
%autochangelog