From a4adba589ac8582fdfb67dfb891da7911cd4704d Mon Sep 17 00:00:00 2001 From: David Shea Date: Sep 14 2015 15:27:11 +0000 Subject: - Update to diff_cover-0.8.1 which does not change anything significant in Linux - Switch to the new packaging guidelines, which renames python-diff-cover to python2-diff-cover - Fix the dependencies for the python3 /usr/bin script. --- diff --git a/.gitignore b/.gitignore index 901b528..b92ee11 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,4 @@ /diff_cover-0.7.1.tar.gz /diff_cover-0.7.2.tar.gz /diff_cover-0.8.0.tar.gz +/diff_cover-0.8.1.tar.gz diff --git a/python-diff-cover.spec b/python-diff-cover.spec index cfe8049..02bdabc 100644 --- a/python-diff-cover.spec +++ b/python-diff-cover.spec @@ -1,5 +1,5 @@ Name: python-diff-cover -Version: 0.8.0 +Version: 0.8.1 Release: 1%{?dist} Summary: Automatically find diff lines that need test coverage @@ -9,12 +9,26 @@ Source0: https://pypi.python.org/packages/source/d/diff_cover/diff_cover- BuildArch: noarch +# needed to generate the man page +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 python2-diff-cover +Summary: Automatically find diff lines that need test coverage in Python 2 +%{?python_provide:%python_provide python2-diff-cover} + 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 @@ -22,16 +36,7 @@ Requires: python-six >= 1.6.1 Requires: python-pygments >= 2.0.1 Requires: python-jinja2_pluralize -# Copy the python3 requires to BuildRequires so we can run the entry point -# scripts for help2man -BuildRequires: python3-jinja2 >= 2.7.1 -BuildRequires: python3-lazy >= 1.1 -BuildRequires: python3-six >= 1.6.1 -BuildRequires: python3-pygments >= 2.0.1 -BuildRequires: python3-jinja2_pluralize - # needed for the _git_root test -BuildRequires: git Requires: git # needed for %check @@ -40,14 +45,7 @@ BuildRequires: pyflakes BuildRequires: python-mock BuildRequires: python-pep8 -BuildRequires: python3-nose -BuildRequires: python3-pyflakes -BuildRequires: python3-mock -BuildRequires: python3-pep8 - -BuildRequires: help2man - -%description +%description -n python2-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* @@ -59,16 +57,40 @@ diff. %package -n python3-diff-cover Summary: Automatically find diff lines that need test coverage in Python 3 +%{?python_provide:%python_provide python3-diff-cover} + BuildRequires: python3-devel BuildRequires: python3-setuptools +# Required for the entry_point scripts +Requires: python3-setuptools + +# from requirements.txt Requires: python3-jinja2 >= 2.7.1 Requires: python3-lazy >= 1.1 Requires: python3-six >= 1.6.1 Requires: python3-pygments >= 2.0.1 Requires: python3-jinja2_pluralize + +# needed for the _git_root test Requires: git +# Copy the python3 requires to BuildRequires so we can run the entry point +# scripts for help2man +BuildRequires: python3-jinja2 >= 2.7.1 +BuildRequires: python3-lazy >= 1.1 +BuildRequires: python3-six >= 1.6.1 +BuildRequires: python3-pygments >= 2.0.1 +BuildRequires: python3-jinja2_pluralize +BuildRequires: git + +# needed for %check +BuildRequires: python3-nose +BuildRequires: python3-pyflakes +BuildRequires: python3-mock +BuildRequires: python3-pep8 + + %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 @@ -80,25 +102,19 @@ output of git diff. It then reports coverage information for lines in the diff. %prep -%setup -q -n diff_cover-%{version} +%autosetup -n diff_cover-%{version} rm -rf diff_cover.egg-info -rm -rf %{py3dir} -cp -a . %{py3dir} - %build -%{__python2} setup.py build - -( cd %{py3dir} && %{__python3} setup.py build ) +%py2_build +%py3_build %install # Run the python3 install last so that it will overwrite the entry-point # scripts in /usr/bin -%{__python2} setup.py install --skip-build --root %{buildroot} - -( cd %{py3dir} && %{__python3} setup.py install --skip-build --root %{buildroot} ) +%py2_install +%py3_install -# Generate documentation for the scripts mkdir -p %{buildroot}%{_mandir}/man1 PYTHONPATH=%{buildroot}%{python2_sitelib} \ help2man --no-info --version-string 'diff-cover %{version}' \ @@ -114,7 +130,7 @@ PYTHONPATH=%{buildroot}%{python2_sitelib} \ nosetests -v %{__python3} -m nose -%files +%files -n python2-diff-cover %license LICENSE %doc AUTHORS README.rst %{python2_sitelib}/diff_cover @@ -131,6 +147,11 @@ nosetests -v %{python3_sitelib}/diff_cover-%{version}-*.egg-info %changelog +* Mon Sep 14 2015 David Shea - 0.8.1-1 +- Update to diff_cover-0.8.1 which does not change anything significant in Linux +- Switch to the new packaging guidelines, which renames python-diff-cover to python2-diff-cover +- Fix the dependencies for the python3 /usr/bin script. + * Wed Aug 26 2015 David Shea - 0.8.0-1 - Move the /usr/bin scripts to the python3 package. - Update to upstream 0.8.0 with the following changes: diff --git a/sources b/sources index 07bdeb7..78516a0 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -252dc473956bb13c2bfcf50060055a6d diff_cover-0.8.0.tar.gz +ccbaa9f2e7ceb31f4e843d02eb2140f2 diff_cover-0.8.1.tar.gz