9c939c
%{?python_enable_dependency_generator}
9c939c
3ca4f9
%bcond_without  docs
3ca4f9
1a9815
Name:           gcovr
3c23c6
Version:        4.2
2436bd
Release:        4%{?dist}
1a9815
Summary:        A code coverage report generator using GNU gcov
1a9815
1a9815
License:        BSD
3c23c6
URL:            https://gcovr.com/
1a9815
Source0:        https://github.com/gcovr/%{name}/archive/%{version}/%{name}-%{version}.tar.gz
1a9815
1a9815
BuildRequires:  python3-devel
1a9815
BuildRequires:  python3-setuptools
3ca4f9
%if %{with docs}
3c23c6
BuildRequires:  %{py3_dist lxml}
3c23c6
BuildRequires:  %{py3_dist Jinja2}
3c23c6
BuildRequires:  %{py3_dist Sphinx}
3c23c6
BuildRequires:  %{py3_dist sphinx_rtd_theme}
3c23c6
BuildRequires:  %{py3_dist sphinxcontrib-autoprogram} >= 0.1.5
3ca4f9
%endif
1a9815
3c23c6
# for gcov
3c23c6
Requires:       gcc
3c23c6
Requires:       %{py3_dist Jinja2}
1a9815
1a9815
BuildArch:      noarch
1a9815
1a9815
%description
1a9815
Gcovr provides a utility for managing the use of the GNU gcov utility
1a9815
and generating summarized code coverage results.
1a9815
1a9815
This command is inspired by the Python coverage.py package, which provides
1a9815
a similar utility in Python. The gcovr command produces either compact
1a9815
human-readable summary reports, machine readable XML reports
1a9815
(in Cobertura format) or simple HTML reports. Thus, gcovr can be viewed
1a9815
as a command-line alternative to the lcov utility, which runs gcov and
1a9815
generates an HTML-formatted report.
1a9815
3ca4f9
%if %{with docs}
3c23c6
%package        doc
3c23c6
Summary:        Documentation of gcovr
3c23c6
3c23c6
%description    doc
3c23c6
Documentation of gcovr.
3ca4f9
%endif
1a9815
1a9815
%prep
3c23c6
%autosetup
1a9815
1a9815
1a9815
%build
1a9815
%py3_build
1a9815
1a9815
1a9815
%install
1a9815
%py3_install
3ca4f9
3ca4f9
%if %{with docs}
3c23c6
# the documentation can only be build **after** gcovr is installed
3c23c6
# => need to set PATH, PYTHONPATH so that the installed binary & package are
3c23c6
# found
3c23c6
# also set PYTHON so that the sphinx Makefile picks up python3 instead of
3c23c6
# python2
3c23c6
export PYTHONPATH=%{buildroot}%{python3_sitelib}
3c23c6
export PATH=%{buildroot}%{_bindir}:$PATH
3c23c6
export PYTHON=python3
3c23c6
3c23c6
pushd .
3c23c6
cd doc
3c23c6
3c23c6
# Manpage
3c23c6
make man
3c23c6
install -D -p -m 0644 build/man/%{name}.1 %{buildroot}%{_mandir}/man1/%{name}.1
3c23c6
3c23c6
# html doc
3c23c6
make html
3c23c6
rm build/html/.buildinfo
3c23c6
3c23c6
popd
3ca4f9
%endif
1a9815
1a9815
1a9815
%files
1a9815
%license LICENSE.txt
adc276
%doc README.rst CHANGELOG.rst
1a9815
%{_bindir}/gcovr
9c939c
%{python3_sitelib}/gcovr*
3ca4f9
%if %{with docs}
3c23c6
%{_mandir}/man1/%{name}.1*
3ca4f9
%endif
3c23c6
3ca4f9
%if %{with docs}
3c23c6
%files doc
3c23c6
%doc doc/build/html/*
3ca4f9
%endif
9c939c
1a9815
1a9815
%changelog
2436bd
* Mon Jul 27 2020 Fedora Release Engineering <releng@fedoraproject.org> - 4.2-4
2436bd
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
2436bd
3ca4f9
* Fri Jun 26 2020 Tommi Rantala <tommi.t.rantala@nokia.com> - 4.2-3
3ca4f9
- Add bcond to allow building without docs
3ca4f9
8c4198
* Tue May 26 2020 Miro Hrončok <mhroncok@redhat.com> - 4.2-2
8c4198
- Rebuilt for Python 3.9
8c4198
3c23c6
* Tue Feb  4 2020 Dan Čermák <dan.cermak@cgc-instruments.com> - 4.2-1
3c23c6
- New upstream release 4.2
3c23c6
- Add doc subpackage containing the user-documentation of gcovr
3c23c6
59fcf8
* Tue Jan 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 4.1-7
59fcf8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
59fcf8
5ddd83
* Thu Oct 03 2019 Miro Hrončok <mhroncok@redhat.com> - 4.1-6
5ddd83
- Rebuilt for Python 3.8.0rc1 (#1748018)
5ddd83
93378d
* Mon Aug 19 2019 Miro Hrončok <mhroncok@redhat.com> - 4.1-5
93378d
- Rebuilt for Python 3.8
93378d
c46573
* Thu Jul 25 2019 Fedora Release Engineering <releng@fedoraproject.org> - 4.1-4
c46573
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
c46573
dde8ec
* Thu Jan 31 2019 Fedora Release Engineering <releng@fedoraproject.org> - 4.1-3
dde8ec
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
dde8ec
9c939c
* Fri Sep 07 2018 Neal Gompa <ngompa13@gmail.com> - 4.1-2
9c939c
- Add missing files installed in the Python sitelib location
9c939c
9c939c
* Fri Sep 07 2018 Neal Gompa <ngompa13@gmail.com> - 4.1-1
f543e5
- Release 4.1 to Fedora (#1626452)
f543e5
- Reformatted changelog entry
f543e5
9c939c
* Fri Sep 07 2018 Alexis Jeandet <alexis.jeandet@member.fsf.org> - 4.1-0
29a17e
- Update to latest gcovr version (4.1)
f543e5
- Removed backported upstream patch as it is part of the release
29a17e
47f8f2
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 3.3-8
47f8f2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
47f8f2
ee31cb
* Tue Jun 19 2018 Miro Hrončok <mhroncok@redhat.com> - 3.3-7
ee31cb
- Rebuilt for Python 3.7
ee31cb
3a9a0b
* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 3.3-6
3a9a0b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
3a9a0b
a2f7c3
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 3.3-5
a2f7c3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
a2f7c3
d58195
* Mon Mar 06 2017 Neal Gompa <ngompa13@gmail.com> - 3.3-4
d58195
- Fix HTML reports for Python 3 (#1428277)
d58195
799b46
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 3.3-3
799b46
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
799b46
1a9815
* Thu Feb  2 2017 Neal Gompa <ngompa13@gmail.com> - 3.3-2
1a9815
- Address review comments (#1418804)
1a9815
- Switch to Python 3
1a9815
1a9815
1a9815
* Thu Feb  2 2017 Neal Gompa <ngompa13@gmail.com> - 3.3-1
1a9815
- Initial package