# 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()")} Name: python-couchdb Version: 0.6 Release: 1%{?dist} Summary: A 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: couchdb Requires: python-httplib2 Requires: python-simplejson %description Providing a convenient high level interface for the CouchDB server. %prep %setup -q -n CouchDB-%{version} %build python setup.py build %install rm -rf $RPM_BUILD_ROOT python setup.py install --skip-build --root $RPM_BUILD_ROOT # calm rpmlint down chmod 0755 $RPM_BUILD_ROOT/%{python_sitelib}/couchdb/json.py chmod 0755 $RPM_BUILD_ROOT/%{python_sitelib}/couchdb/view.py chmod 0755 $RPM_BUILD_ROOT/%{python_sitelib}/couchdb/tools/dump.py chmod 0755 $RPM_BUILD_ROOT/%{python_sitelib}/couchdb/tools/load.py chmod 0755 $RPM_BUILD_ROOT/%{python_sitelib}/couchdb/tools/replication_helper.py chmod 0755 $RPM_BUILD_ROOT/%{python_sitelib}/couchdb/tools/replication_helper_test.py %clean rm -rf $RPM_BUILD_ROOT %files %defattr(-,root,root,-) %doc ChangeLog.txt COPYING README.txt %{_bindir}/* %{python_sitelib}/* %changelog * Wed Nov 25 2009 Sebastian Dziallas - 0.6-1 - initial packaging