File python-nose.spec of Package python-nose

# spec file for package python-nose
# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany.
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via

%define modname nose

Name:           python-nose
Summary:        A unittest extension offering automatic test suite discovery
Version:        1.0.0
Release:        1
License:        GNU LGPL
Group:          Development/Libraries/Python
Source:         %{modname}-%{version}.tar.bz2
Requires:       python-setuptools
BuildRequires:  python-devel python-setuptools
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

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 magic. By default, nose will run tests in files
or directories under the current working directory whose names include "test".

nose also supports doctest tests and may optionally provide a test coverage

%setup -q -n %{modname}-%{version}
sed -i 's,man/man1,share/man/man1,'

python build

python install --prefix=%{_prefix} --root=$RPM_BUILD_ROOT --record-rpm=INSTALLED_FILES
sed -i 's,nosetests.1,nosetests.1.gz,' INSTALLED_FILES
# we need sphinx to build the complete docu
# until then, remove special directories from docu
rm -rf doc/{.static,.templates}
# fix wrong line encoding in example script
sed -i "s|||" examples/

rm -rf %{buildroot}

%doc doc examples AUTHORS CHANGELOG NEWS README.txt lgpl.txt