From 8e1f5314e770ac111c7eba425b20545945d30d3c Mon Sep 17 00:00:00 2001 From: Luke Macken Date: Thu, 20 May 2010 19:00:32 +0000 Subject: [PATCH] - Update URL to http://code.google.com/p/python-nose/ - Align description to reflect that in setup.py - Create a docs subpackage containing HTML & reST documentation - Thanks to Gareth Armstrong at HP for the patch --- python-nose.spec | 77 +++++++++++++++++++++++++++++++++++++----------- 1 file changed, 59 insertions(+), 18 deletions(-) diff --git a/python-nose.spec b/python-nose.spec index 57e8c50..10d774a 100644 --- a/python-nose.spec +++ b/python-nose.spec @@ -1,56 +1,97 @@ -%{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} -%{!?pyver: %define pyver %(%{__python} -c "import sys ; print sys.version[:3]")} +%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} +%{!?pyver: %global pyver %(%{__python} -c "import sys ; print sys.version[:3]")} + +%global upstream_name nose Name: python-nose Version: 0.11.3 -Release: 2%{?dist} +Release: 3%{?dist} Summary: A discovery-based unittest extension for Python Group: Development/Languages License: LGPLv2 -URL: http://somethingaboutorange.com/mrl/projects/nose/ -Source0: http://somethingaboutorange.com/mrl/projects/nose/nose-%{version}.tar.gz -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) +URL: http://code.google.com/p/python-nose/ +Source0: http://pypi.python.org/packages/source/n/%{upstream_name}/%{upstream_name}-%{version}.tar.gz BuildArch: noarch BuildRequires: python-devel python-setuptools-devel Requires: python-setuptools - %description -nose: a discovery-based unittest extension. +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 docs +Summary: Nose Documentation +Group: Documentation +BuildRequires: python-sphinx + +%description docs +Documentation for Nose -nose provides an alternate test discovery and running process for unittest, -one that is intended to mimic the behavior of py.test as much as is -reasonably possible without resorting to too much magic. %prep -%setup -q -n nose-%{version} +%setup -q -n %{upstream_name}-%{version} + %build -CFLAGS="$RPM_OPT_FLAGS" %{__python} setup.py build +%{__python} setup.py build + %install -rm -rf $RPM_BUILD_ROOT -%{__python} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT \ - --single-version-externally-managed --install-data=%{_datadir} +rm -rf %{buildroot} +%{__python} setup.py install -O1 --skip-build --root %{buildroot} \ + --install-data=%{_datadir} + +pushd doc +make html +rm -rf .build/html/.buildinfo .build/html/_sources +mv .build/html .. +rm -rf .build +popd +cp -a doc reST + %check %{__python} selftest.py + %clean -rm -rf $RPM_BUILD_ROOT +rm -rf %{buildroot} + %files %defattr(-,root,root,-) -%doc AUTHORS CHANGELOG lgpl.txt NEWS README.txt +%doc AUTHORS CHANGELOG html lgpl.txt NEWS README.txt %{_bindir}/nosetests %{_bindir}/nosetests-%{pyver} %{_mandir}/man1/nosetests.1.gz %{python_sitelib}/nose-%{version}-py%{pyver}.egg-info %{python_sitelib}/nose +%files docs +%defattr(-,root,root,-) +%doc html reST + %changelog +* Thu May 20 2010 Luke Macken - 0.11.3-3 +- Update URL to http://code.google.com/p/python-nose/ +- Align description to reflect that in setup.py +- Create a docs subpackage containing HTML & reST documentation +- Thanks to Gareth Armstrong at HP for the patch + * Thu May 06 2010 Luke Macken - 0.11.3-2 - Don't hardcode the python version