- Update to 1.0.0

- Create the docs subpackage for text docs even if we don't create the html docs.
- Make python3 subpackage
f38
Toshio Kuratomi 14 years ago
parent 123f1ca214
commit 7a9dd202ba

1
.gitignore vendored

@ -1,2 +1,3 @@
nose-0.11.3.tar.gz
nose-0.11.4.tar.gz
/nose-1.0.0.tar.gz

@ -3,31 +3,35 @@
%{!?python_version: %global python_version %(%{__python} -c "import sys ; print sys.version[:3]")}
%endif
%{!?python3_version: %global python3_version %(%{__python3} -c "import sys; sys.stdout.write(sys.version[:3])")}
%if 0%{?fedora} > 12 || 0%{?rhel} > 6
%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 0
Name: python-nose
Version: 0.11.4
Release: 2%{?dist}
Summary: A discovery-based unittest extension for Python
Version: 1.0.0
Release: 1%{?dist}
Summary: Discovery-based unittest extension for Python
Group: Development/Languages
License: LGPLv2+ and Public Domain
URL: http://somethingaboutorange.com/mrl/projects/nose/
Source0: http://somethingaboutorange.com/mrl/projects/nose/nose-%{version}.tar.gz
# Upstream has this change already.
Patch0: nose-coverage-0.3.4.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch: noarch
BuildRequires: python2-devel
%if 0%{?fedora} && 0%{?fedora} < 13
BuildRequires: python-setuptools-devel
%else
BuildRequires: python-setuptools
%if 0%{?with_python3}
BuildRequires: python3-devel
%endif
BuildRequires: python-setuptools
BuildRequires: dos2unix
BuildRequires: python-coverage
Requires: python-setuptools
@ -48,7 +52,6 @@ plugins. Plugins included with nose provide support for doctest, code
coverage and profiling, flexible attribute-based test selection,
output capture and more.
%if 0%{?with_docs}
%package docs
Summary: Nose Documentation
Group: Documentation
@ -56,37 +59,90 @@ BuildRequires: python-sphinx
%description docs
Documentation for Nose
%endif # with_docs
%if 0%{?with_python3}
%package -n python3-%{upstream_name}
Summary: Discovery-based unittest extension for Python3
Group: Development/Languages
%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.
This package installs the nose module and nosetests3 program that can discover
python3 unittests.
%endif # with_python3
%prep
%setup -q -n %{upstream_name}-%{version}
%patch0 -p1 -b .coverage
dos2unix examples/attrib_plugin.py
%if 0%{?with_python3}
rm -rf %{py3dir}
cp -a . %{py3dir}
%endif # with_python3
%build
%{__python} setup.py build
%if 0%{?with_python3}
pushd %{py3dir}
CFLAGS="$RPM_OPT_FLAGS" %{__python3} setup.py build
popd
%endif # with_python3
%install
rm -rf %{buildroot}
# Must do the python3 install first because the scripts in /usr/bin are
# overwritten with every setup.py install (and we want the python2 version
# to be the default for now).
%if 0%{?with_python3}
pushd %{py3dir}
%{__python3} setup.py install --skip-build --root %{buildroot}
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
popd
%endif # with_python3
%{__python} setup.py install --skip-build --root %{buildroot} \
--install-data=%{_datadir}
%if 0%{?with_docs}
pushd doc
make html
]rm -rf .build/html/.buildinfo .build/html/_sources
rm -rf .build/html/.buildinfo .build/html/_sources
mv .build/html ..
rm -rf .build
popd
cp -a doc reST
%endif # with_docs
cp -a doc reST
rm -rf reST/.static reST/.templates
%check
%{__python} selftest.py
%if 0%{?with_python3}
pushd %{py3dir}
export PYTHONPATH=`pwd`/build/lib
%{__python3} setup.py build_tests
%{__python3} selftest.py
popd
%endif # with_python3
%clean
rm -rf %{buildroot}
@ -100,13 +156,28 @@ rm -rf %{buildroot}
%{_mandir}/man1/nosetests.1.gz
%{python_sitelib}/nose*
%if 0%{?with_docs}
%if 0%{?with_python3}
%files -n python3-%{upstream_name}
%defattr(-,root,root,-)
%doc AUTHORS CHANGELOG lgpl.txt NEWS README.txt
%{_bindir}/nosetests-%{python3_version}
%{_mandir}/man1/nosetests-%{python3_version}.1.gz
%{python3_sitelib}/nose*
%endif
%files docs
%defattr(-,root,root,-)
%doc html reST examples
%doc reST examples
%if 0%{?with_docs}
%doc html
%endif # with_docs
%changelog
* Sun Dec 26 2010 Toshio Kuratomi <toshio@fedoraproject.org> - 1.0.0-1
- Update to 1.0.0
- Create the docs subpackage for text docs even if we don't create the html docs.
- Make python3 subpackage
* Tue Dec 7 2010 Toshio Kuratomi <toshio@fedoraproject.org> - 0.11.4-2
- Fix FTBFS with newer coverage

@ -1 +1 @@
230a3dfc965594a06ce2d63def9f0d98 nose-0.11.4.tar.gz
9542d4c66e04880d8144990de76e0b88 nose-1.0.0.tar.gz

Loading…
Cancel
Save