%define name python3-nose %define srcname nose %define version 1.3.7 %define release 1 %{!?dotests: %define dotests 1} %define is_python %(test -e /opt/freeware/bin/python3_32 && echo 1 || echo 0) %if %{is_python} %define python_sitelib %(python3_32 -c "from distutils.sysconfig import get_python_lib; print (get_python_lib(1))") %endif %define _libdir64 %{_prefix}/lib64 %define is_python_64 %(test -e /usr/bin/python3_64 && echo 1 || echo 0) %if %{is_python_64} %define python_sitelib64 %(python3 -c "from distutils.sysconfig import get_python_lib; print (get_python_lib(1))") %endif Summary: nose extends unittest to make testing easier Name: %{name} Version: %{version} Release: %{release} Source0: %{srcname}-%{version}.tar.gz #Patch0: %{srcname}-1.3.0.issue131.patch #Fix python 3.5 compat # https://github.com/nose-devs/nose/pull/983 Patch1: python3-nose-py35.patch # Fix UnicodeDecodeError with captured output # https://github.com/nose-devs/nose/pull/988 Patch2: python3-nose-unicode.patch # Allow docutils to read utf-8 source Patch3: python3-nose-readunicode.patch # Fix Python 3.6 compatibility # Python now returns ModuleNotFoundError instead of the previous ImportError # https://github.com/nose-devs/nose/pull/1029 Patch4: python3-nose-py36.patch Patch5: python3-nose-coverage4.patch Patch6: python3-nose-py38.patch License: GNU LGPL Group: Development/Libraries BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot Prefix: %{_prefix} BuildArch: noarch Vendor: Jason Pellerin Url: http://readthedocs.org/docs/nose/ BuildRequires: python3 >= 3.7.4 BuildRequires: python3-devel >= 3.7.4, python3-coverage >= 4.5.4 Requires: python3 >= 3.7.4 %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. More information about writing plugins may be found on in the nose API documentation, here: http://readthedocs.org/docs/nose/ If you have recently reported a bug marked as fixed, or have a craving for the very latest, you may want the development version instead: https://github.com/nose-devs/nose/tarball/master#egg=nose-dev %prep %setup -q -n %{srcname}-%{version} %patch1 -p1 -b .py35 %patch2 -p1 -b .unicode %patch3 -p1 -b .readunicode %patch4 -p1 -b .py36 %patch5 -p1 -b .coverage4 %patch6 -p1 -b .py38 %build python3 setup.py build %install [ -d "$RPM_BUILD_ROOT" -a "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT python3 setup.py install --skip-build --root ${RPM_BUILD_ROOT} mv ${RPM_BUILD_ROOT}%{_bindir}/nosetests ${RPM_BUILD_ROOT}%{_bindir}/nosetests-3 mv ${RPM_BUILD_ROOT}%{_prefix}/man/man1/nosetests.1 ${RPM_BUILD_ROOT}%{_prefix}/man/man1/nosetests.1-3 cd ${RPM_BUILD_ROOT} mkdir -p usr/bin cd usr/bin ln -sf ../..%{_bindir}/* . %clean [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} %check python3 setup.py build_tests if [ %{dotests} == 1 ] then (python3 selftest.py || true) fi %files %defattr(-,root,system,-) %doc AUTHORS CHANGELOG PKG-INFO NEWS README.txt lgpl.txt %doc doc/*.rst %{_bindir}/* /usr/bin/* %{_mandir}/man?/* %{python_sitelib}/* %changelog * Tue Jan 14 2020 Ashwini Chandrappa 1.3.7-1 - Build with python3 * Thu Apr 06 2017 Ravi Hirekurabar 1.3.7-1 - Updated to 1.3.7 * Thu Jun 10 2013 Tristan Delhalle - 1.3.0-1 - first version for AIX V6.1 and higher