%{!?python_sitearch: %define python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")} %{!?DEBUG: %define DEBUG 0} %define srcname psycopg2 Name: python-psycopg2 Version: 2.0.2 Release: 1%{?dist} Summary: PostgreSQL database adapter for Python Group: Development/Libraries License: GPL URL: http://initd.org/projects/psycopg2 Source0: http://initd.org/pub/software/psycopg/psycopg2-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: python-devel postgresql-devel Requires: python-abi = %(%{__python} -c "import sys ; print sys.version[:3]") %description psycopg is a PostgreSQL database adapter for the Python programming language (just like pygresql and popy.) It was written from scratch with the aim of being very small and fast, and stable as a rock. The main advantages of psycopg are that it supports the full Python DBAPI-2.0 and being thread safe at level 2. %prep %setup -qn %{srcname}-%{version} %build %if ! %{DEBUG} perl -pi -e 's/,PSYCOPG_DEBUG//' setup.cfg %endif CFLAGS="$RPM_OPT_FLAGS" %{__python} setup.py build %install mkdir -p $RPM_BUILD_ROOT%{python_sitearch} %{__python} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT %clean rm -rf $RPM_BUILD_ROOT %files %defattr(-,root,root,-) %doc AUTHORS ChangeLog INSTALL LICENSE README doc %{python_sitearch}/psycopg2/* %changelog * Tue Feb 28 2006 Shahms E. King 1.1.21-4 - Fix for separated pg_config files in FC5 * Tue Feb 28 2006 Shahms E. King 1.1.21-3 - rebuild for FC5 * Mon Feb 13 2006 Shahms E. King 1.1.21-2 - rebuild for FC5 * Thu Oct 06 2005 Shahms E. King 1.1.21-1 - update to new upstream version * Thu Sep 08 2005 Shahms E. King 1.1.19-1 - update to new upstream version * Thu May 12 2005 Shahms E. King 1.1.18-4 - rebuilt, added disttag * Fri Apr 7 2005 Michael Schwendt - rebuilt * Mon Mar 21 2005 Shahms E. King 1.1.18-2 - Remove explicit postgresql-libs Requires - Other misc. cleanups * Tue Mar 01 2005 Shahms E. King 1.1.18-1 - Repackage for Extras - Update to 1.1.18