c9d6e90
Name:           python-diff-cover
e10097e
Version:        0.8.6
adac1f0
Release:        1%{?dist}
c9d6e90
Summary:        Automatically find diff lines that need test coverage
c9d6e90
3aac943
License:        ASL 2.0
c9d6e90
URL:            https://github.com/edx/diff-cover/
c9d6e90
Source0:        https://pypi.python.org/packages/source/d/diff_cover/diff_cover-%{version}.tar.gz
c9d6e90
c9d6e90
BuildArch:      noarch
c9d6e90
a4adba5
# needed to generate the man page
a4adba5
BuildRequires:  help2man
a4adba5
a4adba5
%description
a4adba5
Diff coverage is the percentage of new or modified lines that are covered by
a4adba5
tests.  This provides a clear and achievable standard for code review: If you
a4adba5
touch a line of code, that line should be covered.  Code coverage is *every*
a4adba5
developer's responsibility!
a4adba5
a4adba5
The diff-cover command line tool compares an XML coverage report with the
a4adba5
output of git diff.  It then reports coverage information for lines in the
a4adba5
diff.
a4adba5
a4adba5
%package -n python2-diff-cover
a4adba5
Summary:        Automatically find diff lines that need test coverage in Python 2
a4adba5
%{?python_provide:%python_provide python2-diff-cover}
a4adba5
c9d6e90
BuildRequires:  python2-devel
c9d6e90
BuildRequires:  python-setuptools
c9d6e90
c9d6e90
# from requirements.txt, checked by setuptools when running entry point scripts
6178d0c
Requires:       python-jinja2 >= 2.7.1
6178d0c
Requires:       python-six >= 1.6.1
3aac943
Requires:       python-pygments >= 2.0.1
c9d6e90
Requires:       python-jinja2_pluralize
c9d6e90
c9d6e90
# needed for the _git_root test
c9d6e90
Requires:       git
c9d6e90
bd3bffb
# needed for %check
bd3bffb
BuildRequires:  python-nose
bd3bffb
BuildRequires:  pyflakes
bd3bffb
BuildRequires:  python-mock
bd3bffb
BuildRequires:  python-pep8
bd3bffb
a4adba5
%description -n python2-diff-cover
c9d6e90
Diff coverage is the percentage of new or modified lines that are covered by
c9d6e90
tests.  This provides a clear and achievable standard for code review: If you
c9d6e90
touch a line of code, that line should be covered.  Code coverage is *every*
c9d6e90
developer's responsibility!
c9d6e90
c9d6e90
The diff-cover command line tool compares an XML coverage report with the
c9d6e90
output of git diff.  It then reports coverage information for lines in the
c9d6e90
diff.
c9d6e90
c9d6e90
%package -n python3-diff-cover
c9d6e90
Summary:        Automatically find diff lines that need test coverage in Python 3
a4adba5
%{?python_provide:%python_provide python3-diff-cover}
a4adba5
c9d6e90
BuildRequires:  python3-devel
c9d6e90
BuildRequires:  python3-setuptools
c9d6e90
a4adba5
# Required for the entry_point scripts
a4adba5
Requires:       python3-setuptools
a4adba5
a4adba5
# from requirements.txt
6178d0c
Requires:       python3-jinja2 >= 2.7.1
6178d0c
Requires:       python3-six >= 1.6.1
3aac943
Requires:       python3-pygments >= 2.0.1
c9d6e90
Requires:       python3-jinja2_pluralize
a4adba5
a4adba5
# needed for the _git_root test
c9d6e90
Requires:       git
c9d6e90
a4adba5
# Copy the python3 requires to BuildRequires so we can run the entry point
a4adba5
# scripts for help2man
a4adba5
BuildRequires:  python3-jinja2 >= 2.7.1
a4adba5
BuildRequires:  python3-six >= 1.6.1
a4adba5
BuildRequires:  python3-pygments >= 2.0.1
a4adba5
BuildRequires:  python3-jinja2_pluralize
a4adba5
BuildRequires:  git
a4adba5
a4adba5
# needed for %check
a4adba5
BuildRequires:  python3-nose
a4adba5
BuildRequires:  python3-pyflakes
a4adba5
BuildRequires:  python3-mock
a4adba5
BuildRequires:  python3-pep8
a4adba5
a4adba5
c9d6e90
%description -n python3-diff-cover
c9d6e90
Diff coverage is the percentage of new or modified lines that are covered by
c9d6e90
tests.  This provides a clear and achievable standard for code review: If you
c9d6e90
touch a line of code, that line should be covered.  Code coverage is *every*
c9d6e90
developer's responsibility!
c9d6e90
c9d6e90
The diff-cover command line tool compares an XML coverage report with the
c9d6e90
output of git diff.  It then reports coverage information for lines in the
c9d6e90
diff.
c9d6e90
c9d6e90
%prep
a4adba5
%autosetup -n diff_cover-%{version}
c9d6e90
rm -rf diff_cover.egg-info
c9d6e90
c9d6e90
%build
a4adba5
%py2_build
a4adba5
%py3_build
c9d6e90
c9d6e90
%install
3aac943
# Run the python3 install last so that it will overwrite the entry-point
3aac943
# scripts in /usr/bin
a4adba5
%py2_install
a4adba5
%py3_install
6178d0c
c9d6e90
mkdir -p %{buildroot}%{_mandir}/man1
adac1f0
PYTHONPATH=%{buildroot}%{python3_sitelib} \
c9d6e90
    help2man --no-info --version-string 'diff-cover %{version}' \
c9d6e90
        -o %{buildroot}%{_mandir}/man1/diff-cover.1 \
c9d6e90
        %{buildroot}%{_bindir}/diff-cover
c9d6e90
adac1f0
PYTHONPATH=%{buildroot}%{python3_sitelib} \
c9d6e90
    help2man --no-info --version-string 'diff-quality %{version}' \
c9d6e90
        -o %{buildroot}%{_mandir}/man1/diff-quality.1 \
c9d6e90
        %{buildroot}%{_bindir}/diff-quality
c9d6e90
bd3bffb
%check
adac1f0
%{__python2} -m nose
bd3bffb
%{__python3} -m nose
bd3bffb
a4adba5
%files -n python2-diff-cover
07547e7
%license LICENSE
07547e7
%doc AUTHORS README.rst
c9d6e90
%{python2_sitelib}/diff_cover
c9d6e90
%{python2_sitelib}/diff_cover-%{version}-*.egg-info
c9d6e90
c9d6e90
%files -n python3-diff-cover
07547e7
%license LICENSE
07547e7
%doc AUTHORS README.rst
3aac943
%{_bindir}/diff-cover
3aac943
%{_bindir}/diff-quality
3aac943
%{_mandir}/man1/diff-cover.1*
3aac943
%{_mandir}/man1/diff-quality.1*
c9d6e90
%{python3_sitelib}/diff_cover
c9d6e90
%{python3_sitelib}/diff_cover-%{version}-*.egg-info
c9d6e90
c9d6e90
%changelog
e10097e
* Mon Dec 21 2015 David Shea <dshea@redhat.com> - 0.8.6-1
e10097e
- Fix handling source paths that contain spaces
e10097e
adac1f0
* Tue Dec  1 2015 David Shea <dshea@redhat.com> - 0.8.5-1
adac1f0
- Fix diff-cover when color.ui=always is set in git
adac1f0
- Drop python-lazy to support Python 3.5
adac1f0
2372ada
* Mon Nov 16 2015 David Shea <dshea@redhat.com> - 0.8.3-3
2372ada
- Rebuild with python 3.5 dependencies in place
2372ada
a9148fb
* Tue Nov 10 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org>
a9148fb
- Rebuilt for https://fedoraproject.org/wiki/Changes/python3.5
a9148fb
f55c83d
* Mon Nov  2 2015 David Shea <dshea@redhat.com> - 0.8.3-1
f55c83d
- Fix diff-quality when installed under a folder containing 'diff-cover'
f55c83d
5b32bae
* Fri Sep 18 2015 David Shea <dshea@redhat.com> - 0.8.2-1
5b32bae
- Fix handling of windows paths in cobertura files
5b32bae
a4adba5
* Mon Sep 14 2015 David Shea <dshea@redhat.com> - 0.8.1-1
a4adba5
- Update to diff_cover-0.8.1 which does not change anything significant in Linux
a4adba5
- Switch to the new packaging guidelines, which renames python-diff-cover to python2-diff-cover
a4adba5
- Fix the dependencies for the python3 /usr/bin script.
a4adba5
3aac943
* Wed Aug 26 2015 David Shea <dshea@redhat.com> - 0.8.0-1
3aac943
- Move the /usr/bin scripts to the python3 package.
3aac943
- Update to upstream 0.8.0 with the following changes:
3aac943
- Added pylint support
3aac943
- Fixed bug around python 1.6 and pyflakes
3aac943
- Update Pygments to 2.0.1
3aac943
- Fixed bug in pylint support around duplciate code issues
3aac943
- Added ability to ignore unstaged changes Thanks DanCardin
3aac943
- License change to ASL 2.0
3aac943
- PyPy Support now verified in tests
3aac943
- Fix for python 2.6 support
3aac943
- Ensure all sources are captured when dealing with non python cobertura files.
3aac943
- Suppress error output on tests when that output is expected
3aac943
- Adds posargs to allow you to configure test runs more easily.
3aac943
- Add support for some additional Flake8 lugins
3aac943
- Fix readme syntax so diff-cover looks prettier on pypy.
3aac943
- Add JSHint to diff-quality.
3aac943
56a4e11
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.7.2-3
56a4e11
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
56a4e11
58e35aa
* Wed Jan 28 2015 David Shea <dshea@redhat.com> - 0.7.2-2
07547e7
- Use %license for the license file
07547e7
bd3bffb
* Fri Nov  7 2014 David Shea <dshea@redhat.com> - 0.7.2-1
bd3bffb
- bugfix around prasing of options
bd3bffb
- enable nosetests in spec file
bd3bffb
4020c24
* Wed Oct 22 2014 David Shea <dshea@redhat.com> - 0.7.1-1
4020c24
- Incorporate sources tag in corbetura reports improving diff-cover's behavior in non python codebases
4020c24
- Generating HTML report still allows STDOUT to print the regular report
4020c24
b279daa
* Mon Oct 13 2014 David Shea <dshea@redhat.com> - 0.6.2-1
b279daa
- Added log line for when diff-cover fails due to coverage being lower than the fail-under condition
b279daa
62a4b1c
* Sun Oct  5 2014 David Shea <dshea@redhat.com> - 0.6.1-1
62a4b1c
- Fixed issue where error message was not being returned after diff-quality errors
62a4b1c
- Fixed issue where diff-quality would fail due to warnings.
62a4b1c
c9d6e90
* Fri Aug  1 2014 David Shea <dshea@redhat.com> - 0.6.0-1
c9d6e90
- Add --fail-under option
c9d6e90
- Fix requires in spec file for python3 package
c9d6e90
c9d6e90
* Mon Jul 21 2014 David Shea <dshea@redhat.com> - 0.5.7-2
c9d6e90
- Actually remove lxml from requires and buildrequires
c9d6e90
c9d6e90
* Tue Jul 15 2014 David Shea <dshea@redhat.com> - 0.5.7-1
c9d6e90
- Diff quality no longer requires every potential quality tool to be installed
c9d6e90
- Fix bug where logging was being called without being configured
c9d6e90
- Remove lxml requirement speeding up builds by roughly 50%
c9d6e90
- Fixed the git requirement
c9d6e90
c9d6e90
* Tue Jul  8 2014 David Shea <dshea@redaht.com> - 0.5.4-1
c9d6e90
- Fix bug when writing report to stdout. Ensure that all file like objects that get passed into the report generator take bytes
c9d6e90
- Run diff cover over the code in each language
c9d6e90
- Pluralize report output
c9d6e90
- Bugfixes around git_path and unicode
c9d6e90
- Add snippets to quality html reports
c9d6e90
- Fix snippets relative path
c9d6e90
- Add support for Pyflakes
c9d6e90
c9d6e90
* Mon Jun 16 2014 David Shea <dshea@redhat.com> - 0.4.3-1
c9d6e90
- Remove dependency on ipython
c9d6e90
c9d6e90
* Wed Jun 11 2014 David Shea <dshea@redhat.com> - 0.4.2-1
c9d6e90
- Use context manager for output_file
c9d6e90
- Write report to stdout even with --html-report
c9d6e90
- Load python sources in a safer way
c9d6e90
c9d6e90
* Mon Jun  2 2014 David Shea <dshea@redhat.com> - 0.4.1-1
c9d6e90
- New upstream release diff-cover-0.4.1
c9d6e90
c9d6e90
* Fri May  2 2014 David Shea <dshea@redhat.com> - 0.4.0-1
c9d6e90
- New upstream release diff-cover-0.4.0
c9d6e90
c9d6e90
* Fri Mar 21 2014 David Shea <dshea@redhat.com> - 0.2.9-1
c9d6e90
- Initial package