Blob Blame History Raw
%global desc Diff coverage is the percentage of new or modified lines that are covered by \
tests. This provides a clear and achievable standard for code review: If you \
touch a line of code, that line should be covered. Code coverage is *every* \
developer's responsibility! \
\
The diff-cover command line tool compares an XML coverage report with the \
output of git diff. It then reports coverage information for lines in the \
diff.


Name:           python-diff-cover
Version:        0.9.12
Release:        1%{?dist}
BuildArch:      noarch

License:        ASL 2.0
Summary:        Automatically find diff lines that need test coverage
URL:            https://github.com/Bachmann1234/diff-cover/
Source0:        %{url}/archive/v%{version}/%{name}-%{version}.tar.gz


# Some of the python3 BuildRequires are needed so we can run the entry point scripts for help2man
BuildRequires:  git
BuildRequires:  help2man
BuildRequires:  python2-devel
BuildRequires:  python2-setuptools
BuildRequires:  python3-devel
BuildRequires:  python3-jinja2 >= 2.7.1
BuildRequires:  python3-jinja2_pluralize
BuildRequires:  python3-pygments >= 2.0.1
BuildRequires:  python3-setuptools
BuildRequires:  python3-six >= 1.6.1


%description
%{desc}


%package -n python2-diff-cover
Summary:        %{summary}

# needed for the _git_root test
Requires:       git
# from requirements.txt, checked by setuptools when running entry point scripts
Requires:       python2-jinja2 >= 2.7.1
Requires:       python2-jinja2_pluralize
Requires:       python2-pygments >= 2.0.1
Requires:       python2-six >= 1.6.1

%{?python_provide:%python_provide python2-diff-cover}


%description -n python2-diff-cover
%{desc}


%package -n python3-diff-cover
Summary:        %{summary}

# needed for the _git_root test
Requires:       git
# Required for the entry_point scripts
Requires:       python3-setuptools
# from requirements.txt
Requires:       python3-jinja2 >= 2.7.1
Requires:       python3-jinja2_pluralize
Requires:       python3-pygments >= 2.0.1
Requires:       python3-six >= 1.6.1


%{?python_provide:%python_provide python3-diff-cover}


%description -n python3-diff-cover
%{desc}


%prep
%autosetup -n diff-cover-%{version}
rm -rf diff_cover.egg-info


%build
%py2_build
%py3_build


%install
# Run the python3 install last so that it will overwrite the entry-point
# scripts in /usr/bin
%py2_install
%py3_install

mkdir -p %{buildroot}%{_mandir}/man1
PYTHONPATH=%{buildroot}%{python3_sitelib} \
    help2man --no-info --version-string 'diff-cover %{version}' \
        -o %{buildroot}%{_mandir}/man1/diff-cover.1 \
        %{buildroot}%{_bindir}/diff-cover

PYTHONPATH=%{buildroot}%{python3_sitelib} \
    help2man --no-info --version-string 'diff-quality %{version}' \
        -o %{buildroot}%{_mandir}/man1/diff-quality.1 \
        %{buildroot}%{_bindir}/diff-quality


%files -n python2-diff-cover
%license LICENSE
%doc AUTHORS README.rst
%{python2_sitelib}/diff_cover
%{python2_sitelib}/diff_cover-%{version}-*.egg-info

%files -n python3-diff-cover
%license LICENSE
%doc AUTHORS README.rst
%{_bindir}/diff-cover
%{_bindir}/diff-quality
%{_mandir}/man1/diff-cover.1*
%{_mandir}/man1/diff-quality.1*
%{python3_sitelib}/diff_cover
%{python3_sitelib}/diff_cover-%{version}-*.egg-info


%changelog
* Tue Oct 31 2017 Randy Barlow <bowlofeggs@fedoraproject.org> - 0.9.12-1
- Unretire package (#1508020).