File python-couchdb.spec of Package python-couchdb

#
# spec file for package python-couchdb (Version 0.8)
#
# Copyright (c) 2010 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 http://bugs.opensuse.org/
#



Name:           python-couchdb
Version:        0.8
Release:        1
Summary:        A Python library for working with CouchDB
Group:          Development/Languages/Python
License:        BSD
Url:            http://code.google.com/p/couchdb-python/
Source0:        http://pypi.python.org/packages/source/C/CouchDB/CouchDB-%{version}.tar.bz2
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
Patch0:         python-couchdb-shebang.patch
%{py_requires}
BuildRequires:  python-devel python-setuptools python-sphinx
Requires:       python-simplejson
%if %{?suse_version: %{suse_version} > 1110} %{!?suse_version:1}
BuildArch:      noarch
%else
%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
%{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(True)")}
%endif

%description
This is a Python library for the CouchDB document-oriented database. It
provides a convenient high level interface for the CouchDB server.

%package doc
License:        BSD
Summary:        The  API reference files for CouchDB 
Group:          Development/Libraries/Python
Requires:       %{name}

%description doc
This is a Python library for the CouchDB document-oriented database. It
provides a convenient high level interface for the CouchDB server.

This package contains documentation for python-couchdb.

%prep
%setup -q -n CouchDB-%{version}
%patch0 -p1

%build
%{__python} setup.py build
mkdir doc/build
make doc

%install
python setup.py install --prefix=%{_prefix} --root=%{buildroot}

%clean
rm -rf $RPM_BUILD_ROOT

%files
%defattr(-,root,root,-)
%doc ChangeLog.txt COPYING README.txt
%{_bindir}/couchdb-dump
%{_bindir}/couchdb-load
%{_bindir}/couchdb-replicate
%{_bindir}/couchpy
%{python_sitelib}/CouchDB-%{version}-py%{py_ver}.egg-info
%{python_sitelib}/couchdb

%files doc
%defattr(-,root,root,-)
%doc doc/build/*

%changelog
openSUSE Build Service is sponsored by