File python-couchdb.spec of Package python-couchdb
# sitelib for noarch packages, sitearch for others (remove the unneeded one)
%{!?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(1)")}
Name: python-couchdb
Version: 0.6
Release: 2%{?dist}
Summary: Python library for working with CouchDB
Group: Development/Languages
License: BSD
URL: http://code.google.com/p/couchdb-python/
Source0: http://pypi.python.org/packages/source/C/CouchDB/CouchDB-%{version}.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch: noarch
BuildRequires: python-devel
Requires: python-httplib2
Requires: python-simplejson
Requires: couchdb >= 0.9.0
%description
This is a Python library for CouchDB. It provides a convenient high level interface for the CouchDB server.
%prep
%setup -q -n CouchDB-%{version}
%build
# Remove CFLAGS=... for noarch packages (unneeded)
CFLAGS="$RPM_OPT_FLAGS" %{__python} setup.py build
%install
rm -rf $RPM_BUILD_ROOT
%{__python} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr(-,root,root,-)
%doc README.txt COPYING ChangeLog.txt doc
# For noarch packages: sitelib
%{python_sitelib}/*
# For arch-specific packages: sitearch
#%{python_sitearch}/*
#%{_bindir}/couch*
%changelog