# # spec file for package PackageName (Version PackageVersion) # # Copyright (c) 2003 SuSE Linux AG, Nuernberg, Germany. # This file and all modifications and additions to the pristine # package are under the same license as the package itself. # # Please submit bug fixes or comments via http://www.suse.de/feedback/ # %{!?python:%define python 2.5} %define version 1.1.21 Summary: a PostgreSQL database adapter for Python Name: python-psycopg Version: %{version} Release: subik.1 Source: psycopg-%{version}.tar.gz License: GPLv2 Group: Development/Libraries/Python BuildRoot: %{_tmppath}/psycopg-%{version}-build Packager: Petr Vanek Url: http://www.initd.org/software/initd/psycopg BuildRequires: python-devel postgresql-devel python-egenix-mx-base Requires: python python-egenix-mx-base postgresql-libs %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. Main authors: Michele Comitini Federico Di Gregorio For the win32 port: Jason Erickson Additional Help: Tom Jenkins (COPY FROM/COPY TO backport) %package doc Summary: Documentation for psycopg python PostgreSQL database adapter Group: Development/Libraries/Python %description doc Documenation and example files for the psycopg python PostgreSQL database adapter. %prep %setup -n psycopg-%{version} %build if [ -x /usr/bin/pg_config ]; then POSTGRESQLINC=$(/usr/bin/pg_config --includedir) POSTGRESQLLIB=$(/usr/bin/pg_config --libdir) else POSTGRESQLINC=/usr/include/pgsql POSTGRESQLLIB=/usr/lib fi %configure --with-python=%{_prefix}/bin/python%{python} \ --with-mxdatetime-includes=%{_prefix}/lib/python%{python}/site-packages/mx/DateTime/mxDateTime \ --with-postgres-includes=$POSTGRESQLINC \ --with-postgres-libs=$POSTGRESQLLIB make %install mkdir -p $RPM_BUILD_ROOT/usr/lib/python%{python}/site-packages install -m 755 psycopgmodule.so $RPM_BUILD_ROOT/usr/lib/python%{python}/site-packages %clean rm -rf $RPM_BUILD_ROOT %files %defattr(-,root,root) /usr/lib/python%{python}/site-packages/*.so %files doc %defattr(-,root,root) %doc AUTHORS COPYING CREDITS FAQ INSTALL NEWS README RELEASE-1.0 SUCCESS TODO doc %changelog * Wed Dec 13 2006 Petr Vanek - initial release