[python-diff-cover] Initial import of python-diff-cover-0.6.0-1

David Shea dshea at fedoraproject.org
Tue Aug 19 13:29:57 UTC 2014


commit c9d6e90eb0c5c78d161a8d203cb2b355bcdc9f8e
Author: David Shea <dshea at redhat.com>
Date:   Tue Aug 19 09:29:28 2014 -0400

    Initial import of python-diff-cover-0.6.0-1

 .gitignore                               |    1 +
 python-diff-cover-0.2.9-noscripts3.patch |   31 ++++++
 python-diff-cover.spec                   |  157 ++++++++++++++++++++++++++++++
 sources                                  |    1 +
 4 files changed, 190 insertions(+), 0 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index e69de29..2a0bd52 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/diff_cover-0.6.0.tar.gz
diff --git a/python-diff-cover-0.2.9-noscripts3.patch b/python-diff-cover-0.2.9-noscripts3.patch
new file mode 100644
index 0000000..c70e5ff
--- /dev/null
+++ b/python-diff-cover-0.2.9-noscripts3.patch
@@ -0,0 +1,31 @@
+diff -purN diff_cover-0.2.9.orig/setup3.py diff_cover-0.2.9/setup3.py
+--- diff_cover-0.2.9.orig/setup3.py	1969-12-31 19:00:00.000000000 -0500
++++ diff_cover-0.2.9/setup3.py	2014-03-21 11:20:58.228016126 -0400
+@@ -0,0 +1,27 @@
++#!/usr/bin/env python
++
++from setuptools import setup
++from diff_cover import VERSION, DESCRIPTION
++
++REQUIREMENTS = [line.strip() for line in
++                open("requirements.txt").readlines()]
++
++setup(
++    name='diff_cover',
++    version=VERSION,
++    author='edX',
++    url='http://github.com/edx/diff-cover',
++    description=DESCRIPTION,
++    license='AGPL',
++    classifiers=['Development Status :: 3 - Alpha',
++                 'Environment :: Console',
++                 'Intended Audience :: Developers',
++                 'License :: OSI Approved :: GNU Affero General Public License v3',
++                 'Operating System :: OS Independent',
++                 'Programming Language :: Python',
++                 'Topic :: Software Development :: Testing',
++                 'Topic :: Software Development :: Quality Assurance'],
++    packages=['diff_cover'],
++    package_data={'diff_cover': ['templates/*.txt', 'templates/*.html']},
++    install_requires=REQUIREMENTS
++)
diff --git a/python-diff-cover.spec b/python-diff-cover.spec
new file mode 100644
index 0000000..81da68f
--- /dev/null
+++ b/python-diff-cover.spec
@@ -0,0 +1,157 @@
+Name:           python-diff-cover
+Version:        0.6.0
+Release:        1%{?dist}
+Summary:        Automatically find diff lines that need test coverage
+
+License:        AGPLv3
+URL:            https://github.com/edx/diff-cover/
+Source0:        https://pypi.python.org/packages/source/d/diff_cover/diff_cover-%{version}.tar.gz
+Patch0:         python-diff-cover-0.2.9-noscripts3.patch
+
+BuildArch:      noarch
+
+BuildRequires:  python2-devel
+BuildRequires:  python-setuptools
+
+# Required for the entry_point scripts
+Requires:       python-setuptools
+
+# from requirements.txt, checked by setuptools when running entry point scripts
+Requires:       python-jinja2 >= 2.7.1
+Requires:       python-lazy >= 1.1
+Requires:       python-six >= 1.6.1
+Requires:       python-pygments == 1.6
+Requires:       python-jinja2_pluralize
+
+# Copy the python2 requires to BuildRequires so we can run the entry point
+# scripts for help2man
+BuildRequires:  python-jinja2 >= 2.7.1
+BuildRequires:  python-lazy >= 1.1
+BuildRequires:  python-six >= 1.6.1
+BuildRequires:  python-pygments == 1.6
+BuildRequires:  python-jinja2_pluralize
+
+# needed for the _git_root test
+BuildRequires:  git
+Requires:       git
+
+BuildRequires:  help2man
+
+%description
+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.
+
+%package -n python3-diff-cover
+Summary:        Automatically find diff lines that need test coverage in Python 3
+BuildRequires:  python3-devel
+BuildRequires:  python3-setuptools
+
+Requires:       python3-jinja2 >= 2.7.1
+Requires:       python3-lazy >= 1.1
+Requires:       python3-six >= 1.6.1
+Requires:       python3-pygments >= 1.6
+Requires:       python3-jinja2_pluralize
+Requires:       git
+
+%description -n python3-diff-cover
+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.
+
+%prep
+%setup -q -n diff_cover-%{version}
+rm -rf diff_cover.egg-info
+
+# Disable scripts for the python3 package. The entry points in bindir
+# will be provided by the python2 package.
+%patch0 -p1
+
+rm -rf %{py3dir}
+cp -a . %{py3dir}
+
+%build
+%{__python2} setup.py build
+
+( cd %{py3dir} && %{__python3} setup3.py build )
+
+%install
+%{__python2} setup.py install --skip-build --root %{buildroot}
+
+( cd %{py3dir} && %{__python3} setup3.py install --skip-build --root %{buildroot} )
+
+# Generate documentation for the scripts
+mkdir -p %{buildroot}%{_mandir}/man1
+PYTHONPATH=%{buildroot}%{python2_sitelib} \
+    help2man --no-info --version-string 'diff-cover %{version}' \
+        -o %{buildroot}%{_mandir}/man1/diff-cover.1 \
+        %{buildroot}%{_bindir}/diff-cover
+
+PYTHONPATH=%{buildroot}%{python2_sitelib} \
+    help2man --no-info --version-string 'diff-quality %{version}' \
+        -o %{buildroot}%{_mandir}/man1/diff-quality.1 \
+        %{buildroot}%{_bindir}/diff-quality
+
+%files
+%doc AUTHORS LICENSE README.rst
+%{_bindir}/diff-cover
+%{_bindir}/diff-quality
+%{_mandir}/man1/diff-cover.1*
+%{_mandir}/man1/diff-quality.1*
+%{python2_sitelib}/diff_cover
+%{python2_sitelib}/diff_cover-%{version}-*.egg-info
+
+%files -n python3-diff-cover
+%doc AUTHORS LICENSE README.rst
+%{python3_sitelib}/diff_cover
+%{python3_sitelib}/diff_cover-%{version}-*.egg-info
+
+%changelog
+* Fri Aug  1 2014 David Shea <dshea at redhat.com> - 0.6.0-1
+- Add --fail-under option
+- Fix requires in spec file for python3 package
+
+* Mon Jul 21 2014 David Shea <dshea at redhat.com> - 0.5.7-2
+- Actually remove lxml from requires and buildrequires
+
+* Tue Jul 15 2014 David Shea <dshea at redhat.com> - 0.5.7-1
+- Diff quality no longer requires every potential quality tool to be installed
+- Fix bug where logging was being called without being configured
+- Remove lxml requirement speeding up builds by roughly 50%
+- Fixed the git requirement
+
+* Tue Jul  8 2014 David Shea <dshea at redaht.com> - 0.5.4-1
+- Fix bug when writing report to stdout. Ensure that all file like objects that get passed into the report generator take bytes
+- Run diff cover over the code in each language
+- Pluralize report output
+- Bugfixes around git_path and unicode
+- Add snippets to quality html reports
+- Fix snippets relative path
+- Add support for Pyflakes
+
+* Mon Jun 16 2014 David Shea <dshea at redhat.com> - 0.4.3-1
+- Remove dependency on ipython
+
+* Wed Jun 11 2014 David Shea <dshea at redhat.com> - 0.4.2-1
+- Use context manager for output_file
+- Write report to stdout even with --html-report
+- Load python sources in a safer way
+
+* Mon Jun  2 2014 David Shea <dshea at redhat.com> - 0.4.1-1
+- New upstream release diff-cover-0.4.1
+
+* Fri May  2 2014 David Shea <dshea at redhat.com> - 0.4.0-1
+- New upstream release diff-cover-0.4.0
+
+* Fri Mar 21 2014 David Shea <dshea at redhat.com> - 0.2.9-1
+- Initial package
diff --git a/sources b/sources
index e69de29..ffb8307 100644
--- a/sources
+++ b/sources
@@ -0,0 +1 @@
+123d4e4a705d9a1cb52ca28925e2be59  diff_cover-0.6.0.tar.gz


More information about the scm-commits mailing list