%bcond_with dotests %global __tar /opt/freeware/bin/tar %global py_major 3.9 %global py_minor 16 %global python_major python%{py_major} %global pkgname nose %global meta_package python3-%{pkgname} %global python3_sitearch %(%{python_major} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(0))") Name: %{python_major}-%{pkgname} Version: 1.3.7 Release: 2 Summary: nose extends unittest to make testing easier License: GNU LGPL URL: https://pypi.python.org/pypi/%{pkgname} Source0: https://files.pythonhosted.org/packages/source/n/%{pkgname}/%{pkgname}-%{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 BuildArch: noarch BuildRequires: %{python_major}-devel >= %{py_major}.%{py_minor} BuildRequires: %{python_major}-setuptools >= 65.2.0 Requires: %{python_major} >= %{py_major}.%{py_minor} %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 %package -n %{meta_package} Summary: Meta-package for %{name} Requires: python3 >= %{py_major}.%{py_minor} Requires: %{name} = %{version}-%{release} %description -n %{meta_package} This is a Meta-package for %{name} package. %prep %autosetup -n %{pkgname}-%{version} -p1 %build export PATH=/opt/freeware/bin:$PATH 2to3-3.9 --write --nobackups --no-diffs . 2to3-3.9 --write --nobackups --no-diffs -d $(find -name '*.rst') %{python_major} setup.py build %install [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} %{python_major} setup.py install --root %{buildroot} cd ${RPM_BUILD_ROOT}%{_bindir} mv nosetests nosetests-3.9 ln -sf nosetests-3.9 nosetests-3 ln -sf nosetests-3.9 nosetests mv ${RPM_BUILD_ROOT}%{_prefix}/man/man1/nosetests.1 ${RPM_BUILD_ROOT}%{_prefix}/man/man1/nosetests-%{py_major}.1 %check %if %{with dotests} #python3 -m venv python_venv #. ./python_venv/bin/activate #pip3 install pytest #pip3 install hypothesis #ulimit -d unlimited #ulimit -n unlimited #ulimit -m unlimited # ulimit -f unlimited #( python runtests.py -m 'full' -v || true ) #deactivate %endif %clean [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} %files %defattr(-,root,system,-) %license lgpl.txt %doc AUTHORS CHANGELOG PKG-INFO NEWS README.txt %doc doc/*.rst %{_bindir}/nosetests-%{py_major} %{python3_sitearch}/* %{_mandir}/man?/* %files -n %{meta_package} %defattr(-,root,system,-) %{_bindir}/nosetests-3 %{_bindir}/nosetests %changelog * Wed Mar 08 2023 Reshma V Kumar - 1.3.7-2 - Nose for python3.9