%{!?python_sitearch: %define python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")} %{?filter_setup: %filter_provides_in %{python_sitearch}.*\.so$ %filter_setup } Name: python-cdb Version: 0.34 Release: 3%{?dist} Summary: Constant database library adapted as a python extension module Group: Development/Libraries License: GPLv2+ URL: http://pilcrow.madison.wi.us/#pycdb Source0: http://pilcrow.madison.wi.us/python-cdb/%{name}-%{version}.tar.gz #Updated address, patch sent to the upstream on 15/05/2012 Patch0: copying.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: python2-devel python-setuptools %description D. J. Bernstein's constant database library adapted as a python extension module. Like GDBM and kin, cdb files map keys to values. The file format boasts wickedly fast lookups and atomic updates. %prep %setup -q %patch0 -p0 %build %{__python} setup.py build %install rm -rf $RPM_BUILD_ROOT %{__python} setup.py install -O1 --root $RPM_BUILD_ROOT %files %defattr(-,root,root,-) %doc README Example COPYING %{python_sitearch}/cdbmodule.so %{python_sitearch}/python_cdb-%{version}-*.egg-info %changelog * Mon May 14 2012 Kushal Das 0.34-3 - COPYING patch * Mon Apr 23 2012 Kushal Das 0.34-2 - Fixed the license of the package * Thu Apr 12 2012 Kushal Das 0.34-1 - Intial package