diff --git a/python-nose-coverage4.patch b/python-nose-coverage4.patch new file mode 100644 index 0000000..94d3f3c --- /dev/null +++ b/python-nose-coverage4.patch @@ -0,0 +1,21 @@ +diff -up nose-1.3.7/nose/plugins/cover.py.coverage4 nose-1.3.7/nose/plugins/cover.py +--- nose-1.3.7/nose/plugins/cover.py.coverage4 2015-04-04 03:28:20.000000000 -0600 ++++ nose-1.3.7/nose/plugins/cover.py 2016-11-09 16:16:32.832927855 -0700 +@@ -187,7 +187,7 @@ class Coverage(Plugin): + for name, module in sys.modules.items() + if self.wantModuleCoverage(name, module)] + log.debug("Coverage report will cover modules: %s", modules) +- self.coverInstance.report(modules, file=stream) ++ self.coverInstance.report(modules, file=stream, show_missing=True) + + import coverage + if self.coverHtmlDir: +@@ -207,7 +207,7 @@ class Coverage(Plugin): + # make sure we have minimum required coverage + if self.coverMinPercentage: + f = StringIO.StringIO() +- self.coverInstance.report(modules, file=f) ++ self.coverInstance.report(modules, file=f, show_missing=True) + + multiPackageRe = (r'-------\s\w+\s+\d+\s+\d+(?:\s+\d+\s+\d+)?' + r'\s+(\d+)%\s+\d*\s{0,1}$') diff --git a/python-nose.spec b/python-nose.spec index 0a47640..c0a240f 100644 --- a/python-nose.spec +++ b/python-nose.spec @@ -17,14 +17,16 @@ Name: python-nose Version: 1.3.7 -Release: 8%{?dist} +Release: 9%{?dist} Summary: Discovery-based unittest extension for Python Group: Development/Languages License: LGPLv2+ and Public Domain URL: https://nose.readthedocs.org/en/latest/ Source0: http://pypi.python.org/packages/source/n/nose/nose-%{version}.tar.gz -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) +# Make compatible with coverage 4.1 +# https://github.com/nose-devs/nose/pull/1004 +Patch0: python-nose-coverage4.patch BuildArch: noarch BuildRequires: python2-devel @@ -94,6 +96,7 @@ python3 unittests. %prep %setup -q -n %{upstream_name}-%{version} +%patch0 -p1 -b .coverage4 dos2unix examples/attrib_plugin.py @@ -180,6 +183,9 @@ rm -rf %{buildroot} %endif # with_docs %changelog +* Wed Nov 9 2016 Orion Poplawski 1.3.7-9 +- Add patch to fix build with coverage 4.1 + * Tue Jul 19 2016 Fedora Release Engineering - 1.3.7-8 - https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages