4 Summary: psycopg is a PostgreSQL database adapter for Python
5 Summary(pl): psycopg jest przeznaczonym dla Pythona interfejsem do bazy PostgreSQL
10 Group: Libraries/Python
11 Source0: http://initd.org/pub/software/psycopg/%{module}-%{version}.tar.gz
12 # Source0-md5: f64f92a004d56659acb7bde462eedf0d
13 Patch0: %{name}-lib64.patch
14 URL: http://www.initd.org/software/psycopg/
15 BuildRequires: autoconf
16 BuildRequires: postgresql-backend-devel
17 BuildRequires: python-devel
18 BuildRequires: python-mx-DateTime-devel
19 Requires: postgresql-libs
20 %pyrequires_eq python-modules
21 Requires: python-mx-DateTime
22 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
24 %define zope_subname ZPsycopgDA
27 psycopg is a PostgreSQL database adapter for the Python programming
28 language (just like pygresql and popy.) It was written from scratch
29 with the aim of being very small and fast, and stable as a rock. The
30 main advantages of psycopg are that it supports the full Python
31 DBAPI-2.0 and being thread safe at level 2.
34 psycopg jest przeznaczonym dla Pythona interfejsem do bazy danych
35 PostgreSQL (tak jak pygresql i popy). Zosta³ zakodowany od pocz±tku
36 z za³o¿eniem ¿e ma byæ bardzo ma³y, szybki i stabilny. G³ówna zalet±
37 psycopg jest, ¿e w jest pe³ni zgodny z standardem DBAPI-2.0 i jest
38 'thread safe' na poziomie 2.
40 %package -n Zope-%{zope_subname}
41 Summary: Zope PostgreSQL database adapter
42 Summary(pl): Interfejs bazy danych PostgreSQL do Zope
43 Group: Development/Languages/Python
44 Requires: %{name} = %{version}-%{release}
46 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
48 %description -n Zope-%{zope_subname}
49 Zope PostgreSQL database adapter.
51 %description -n Zope-%{zope_subname} -l pl
52 Interfejs bazy danych PostgreSQL do Zope.
55 %setup -q -n %{module}-%{version}
56 %if "%{_lib}" == "lib64"
64 --with-python=%{_bindir}/python \
65 --with-mxdatetime-includes=%{py_incdir}/mx \
66 --with-postgres-includes=%{_includedir}/postgresql/server
70 rm -rf $RPM_BUILD_ROOT
71 install -d $RPM_BUILD_ROOT{%{py_sitedir},%{_datadir}/Zope-%{zope_subname}}
73 install psycopgmodule.so $RPM_BUILD_ROOT%{py_sitedir}
75 cp -ar %{zope_subname}/* $RPM_BUILD_ROOT%{_datadir}/Zope-%{zope_subname}
76 %py_comp $RPM_BUILD_ROOT%{_datadir}/Zope-%{zope_subname}
77 %py_ocomp $RPM_BUILD_ROOT%{_datadir}/Zope-%{zope_subname}
78 rm -f $RPM_BUILD_ROOT%{_datadir}/Zope-%{zope_subname}/*.py
81 rm -rf $RPM_BUILD_ROOT
83 %post -n Zope-%{zope_subname}
84 /usr/sbin/installzopeproduct %{_datadir}/Zope-%{zope_subname} %{zope_subname}
85 if [ -f /var/lock/subsys/zope ]; then
86 /etc/rc.d/init.d/zope restart >&2
89 %postun -n Zope-%{zope_subname}
90 if [ "$1" = "0" ]; then
91 /usr/sbin/installzopeproduct -d %{zope_subname}
92 if [ -f /var/lock/subsys/zope ]; then
93 /etc/rc.d/init.d/zope restart >&2
98 %defattr(644,root,root,755)
99 %doc AUTHORS CREDITS FAQ NEWS README RELEASE-1.0 SUCCESS TODO doc
100 %attr(755,root,root) %{py_sitedir}/*.so
102 %files -n Zope-%{zope_subname}
103 %defattr(644,root,root,755)
104 %{_datadir}/Zope-%{zope_subname}