Provide nosetests-3 (#1289820).
Also: - Rename python-nose to python2-nose and use Python provides macro. - Include the license with the -docs subpackage. - Use symlinks to provide man pages for all the Python version variants of /usr/bin/nosetests. - The -docs subpackage no longer requires python-nose since it doesn't truly need it.
This commit is contained in:
parent
0f74bcca1b
commit
7539d24f32
108
python-nose.spec
108
python-nose.spec
@ -9,19 +9,36 @@
|
||||
%global with_python3 1
|
||||
%endif
|
||||
|
||||
|
||||
%global upstream_name nose
|
||||
|
||||
# Enable building without docs to avoid a circular dependency between this and python-sphinx
|
||||
%global with_docs 1
|
||||
|
||||
%global sum Discovery-based unit test extension for Python
|
||||
%global desc nose extends the test loading and running features of unit test, 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 unit test, 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.\
|
||||
|
||||
|
||||
Name: python-nose
|
||||
Version: 1.3.7
|
||||
Release: 10%{?dist}
|
||||
Summary: Discovery-based unittest extension for Python
|
||||
Release: 11%{?dist}
|
||||
BuildArch: noarch
|
||||
|
||||
Group: Development/Languages
|
||||
License: LGPLv2+ and Public Domain
|
||||
Summary: %{sum}
|
||||
Group: Development/Languages
|
||||
URL: https://nose.readthedocs.org/en/latest/
|
||||
Source0: http://pypi.python.org/packages/source/n/nose/nose-%{version}.tar.gz
|
||||
# Make compatible with coverage 4.1
|
||||
@ -36,9 +53,7 @@ Patch2: python-nose-unicode.patch
|
||||
# Allow docutils to read utf-8 source
|
||||
Patch3: python-nose-readunicode.patch
|
||||
|
||||
BuildArch: noarch
|
||||
BuildRequires: python2-devel
|
||||
Provides: python2-%{upstream_name} = %{version}-%{release}
|
||||
%if 0%{?with_python3}
|
||||
BuildRequires: python3-devel
|
||||
BuildRequires: python3-setuptools
|
||||
@ -47,23 +62,11 @@ BuildRequires: python3-coverage >= 3.4-1
|
||||
BuildRequires: python-setuptools
|
||||
BuildRequires: dos2unix
|
||||
BuildRequires: python-coverage >= 3.4-1
|
||||
Requires: python-setuptools
|
||||
|
||||
|
||||
%description
|
||||
nose extends the test loading and running features of unittest, making
|
||||
it easier to write, find and run tests.
|
||||
%{desc}
|
||||
|
||||
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 docs
|
||||
Summary: Nose Documentation
|
||||
@ -71,35 +74,37 @@ Group: Documentation
|
||||
%if 0%{?with_docs}
|
||||
BuildRequires: python-sphinx
|
||||
%endif
|
||||
Requires: python-nose
|
||||
|
||||
|
||||
%description docs
|
||||
Documentation for Nose
|
||||
|
||||
|
||||
%package -n python2-%{upstream_name}
|
||||
Summary: %{sum}
|
||||
|
||||
Requires: python-setuptools
|
||||
|
||||
%{?python_provide:%python_provide python2-%{upstream_name}}
|
||||
|
||||
|
||||
%description -n python2-%{upstream_name}
|
||||
%{desc}
|
||||
|
||||
|
||||
%if 0%{?with_python3}
|
||||
%package -n python3-%{upstream_name}
|
||||
Summary: Discovery-based unittest extension for Python3
|
||||
Summary: Discovery-based unit test extension for Python3
|
||||
Group: Development/Languages
|
||||
Requires: python3-setuptools
|
||||
%{?python_provide:%python_provide python3-%{upstream_name}}
|
||||
|
||||
|
||||
%description -n python3-%{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.
|
||||
%{desc}
|
||||
|
||||
This package installs the nose module and nosetests3 program that can discover
|
||||
python3 unittests.
|
||||
python3 unit tests.
|
||||
%endif # with_python3
|
||||
|
||||
%prep
|
||||
@ -133,12 +138,22 @@ popd
|
||||
pushd %{py3dir}
|
||||
%py3_install
|
||||
rm %{buildroot}%{_bindir}/nosetests
|
||||
ln -s ./nosetests-%{python3_version} %{buildroot}%{_bindir}/nosetests-3
|
||||
mkdir -m 0755 -p %{buildroot}%{_mandir}/man1/
|
||||
mv %{buildroot}%{_prefix}/man/man1/nosetests.1 %{buildroot}%{_mandir}/man1/nosetests-%{python3_version}.1
|
||||
ln -s ./nosetests-%{python3_version}.1 %{buildroot}%{_mandir}/man1/nosetests-3.1
|
||||
popd
|
||||
%endif # with_python3
|
||||
|
||||
%py2_install -- --install-data=%{_datadir}
|
||||
# Let's make /usr/bin/nosetests just be a symlink to nosetests-{python2_version}
|
||||
rm %{buildroot}%{_bindir}/nosetests
|
||||
ln -s nosetests-%{python2_version} %{buildroot}%{_bindir}/nosetests
|
||||
ln -s nosetests-%{python2_version} %{buildroot}%{_bindir}/nosetests-2
|
||||
# We'll do something similar for the man page
|
||||
mv %{buildroot}%{_mandir}/man1/nosetests.1 %{buildroot}%{_mandir}/man1/nosetests-%{python2_version}.1
|
||||
ln -s ./nosetests-%{python2_version}.1 %{buildroot}%{_mandir}/man1/nosetests.1
|
||||
ln -s ./nosetests-%{python2_version}.1 %{buildroot}%{_mandir}/man1/nosetests-2.1
|
||||
|
||||
%if 0%{?with_docs}
|
||||
pushd doc
|
||||
@ -164,30 +179,41 @@ popd
|
||||
%endif # with_python3
|
||||
|
||||
|
||||
%files
|
||||
%files -n python2-%{upstream_name}
|
||||
%license lgpl.txt
|
||||
%doc AUTHORS CHANGELOG NEWS README.txt
|
||||
%{_bindir}/nosetests
|
||||
%{_bindir}/nosetests-2
|
||||
%{_bindir}/nosetests-%{python_version}
|
||||
%{_mandir}/man1/nosetests.1.gz
|
||||
%{_mandir}/man1/nosetests-2.1.gz
|
||||
%{_mandir}/man1/nosetests-%{python_version}.1.gz
|
||||
%{python_sitelib}/nose*
|
||||
|
||||
%if 0%{?with_python3}
|
||||
%files -n python3-%{upstream_name}
|
||||
%license lgpl.txt
|
||||
%doc AUTHORS CHANGELOG NEWS README.txt
|
||||
%{_bindir}/nosetests-3
|
||||
%{_bindir}/nosetests-%{python3_version}
|
||||
%{_mandir}/man1/nosetests-3.1.gz
|
||||
%{_mandir}/man1/nosetests-%{python3_version}.1.gz
|
||||
%{python3_sitelib}/nose*
|
||||
%endif
|
||||
|
||||
%files docs
|
||||
%doc reST examples
|
||||
%license lgpl.txt
|
||||
%doc AUTHORS CHANGELOG examples NEWS README.txt reST
|
||||
%if 0%{?with_docs}
|
||||
%doc html
|
||||
%endif # with_docs
|
||||
|
||||
%changelog
|
||||
* Mon Dec 05 2016 Randy Barlow <bowlofeggs@fedoraproject.org> - 1.3.7-11
|
||||
- Provide nosetests-3 (#1289820).
|
||||
- Rename python-nose to python2-nose and use Python provides macro.
|
||||
- Include the license with the -docs subpackage.
|
||||
- Use symlinks to provide man pages for all the Python version variants of /usr/bin/nosetests.
|
||||
- The -docs subpackage no longer requires python-nose since that doesn't make sense.
|
||||
|
||||
* Tue Nov 15 2016 Orion Poplawski <orion@cora.nwra.com> 1.3.7-10
|
||||
- Add upstream patch to fix python 3.5 compat
|
||||
- Add patch to allow docutils to read unicode source
|
||||
|
Loading…
Reference in New Issue
Block a user