%global upstream_name nose # Fedora does not yet have python3_pkgversion %{!?python3_pkgversion:%global python3_pkgversion 3} Name: python3-nose Version: 1.3.7 Release: 2%{?dist} Summary: Discovery-based unittest extension for Python 3 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 BuildArch: noarch BuildRequires: python%{python3_pkgversion}-devel BuildRequires: python%{python3_pkgversion}-setuptools BuildRequires: python%{python3_pkgversion}-coverage BuildRequires: dos2unix %description nose extends the test loading and running features of unittest, making it easier to write, find and run tests. By default, nose will run tests in files or directories under the current working directory whose names include "test" or "Test" at a word boundary (like "test_this" or "functional_test" or "TestClass" but not "libtest"). Test output is similar to that of unittest, but also includes captured stdout output from failing tests, for easy print-style debugging. These features, and many more, are customizable through the use of plugins. Plugins included with nose provide support for doctest, code coverage and profiling, flexible attribute-based test selection, output capture and more. %package -n python%{python3_pkgversion}-%{upstream_name} Summary: Discovery-based unittest extension for Python %{python3_version} Requires: python%{python3_pkgversion}-setuptools %description -n python%{python3_pkgversion}-%{upstream_name} nose extends the test loading and running features of unittest, making it easier to write, find and run tests. By default, nose will run tests in files or directories under the current working directory whose names include "test" or "Test" at a word boundary (like "test_this" or "functional_test" or "TestClass" but not "libtest"). Test output is similar to that of unittest, but also includes captured stdout output from failing tests, for easy print-style debugging. These features, and many more, are customizable through the use of plugins. Plugins included with nose provide support for doctest, code coverage and profiling, flexible attribute-based test selection, output capture and more. This package installs the nose module and nosetests-%{python3_version} program that can discover python%{python3_pkgversion} unittests. %prep %setup -q -n %{upstream_name}-%{version} dos2unix examples/attrib_plugin.py %build %py3_build %install %py3_install rm %{buildroot}%{_bindir}/nosetests mkdir -m 0755 -p %{buildroot}%{_mandir}/man1/ mv %{buildroot}%{_prefix}/man/man1/nosetests.1 %{buildroot}%{_mandir}/man1/nosetests-%{python3_version}.1 %check export PYTHONPATH=`pwd`/build/lib %{__python3} setup.py build_tests # Various selftests fail with Python 3.5; yet nose is needed to rebuild other packages # (reported upstream as https://github.com/nose-devs/nose/issues/928 \ %{__python3} selftest.py -v %files -n python%{python3_pkgversion}-%{upstream_name} %license lgpl.txt %doc AUTHORS CHANGELOG NEWS README.txt doc/*.rst doc/api doc/plugins %{_bindir}/nosetests-%{python3_version} %{_mandir}/man1/nosetests-%{python3_version}.1.gz %{python3_sitelib}/nose* %changelog * Tue Feb 2 2016 Orion Poplawski - 1.3.7-2 - Fix URL - Fix long line in description - Include more documentation * Wed Dec 30 2015 Orion Poplawski - 1.3.7-1 - Initial EPEL7 package