7 %define module psycopg2
9 Summary: psycopg is a PostgreSQL database adapter for Python
10 Summary(pl): psycopg jest przeznaczonym dla Pythona interfejsem do bazy PostgreSQL
11 Name: python-%{module}
15 Group: Libraries/Python
16 Source0: http://initd.org/pub/software/psycopg/%{module}-%{version}.tar.gz
17 # Source0-md5: 6c056b261782c51f53ceccbf86c08749
18 #Patch0: %{name}-lib64.patch
19 URL: http://www.initd.org/software/psycopg/
20 BuildRequires: autoconf
21 BuildRequires: postgresql-backend-devel
22 BuildRequires: postgresql-devel
23 BuildRequires: python-devel
24 Requires: postgresql-libs
25 %pyrequires_eq python-modules
26 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
28 %define zope_subname ZPsycopgDA
31 psycopg is a PostgreSQL database adapter for the Python programming
32 language (just like pygresql and popy.) It was written from scratch
33 with the aim of being very small and fast, and stable as a rock. The
34 main advantages of psycopg are that it supports the full Python
35 DBAPI-2.0 and being thread safe at level 2.
38 psycopg jest przeznaczonym dla Pythona interfejsem do bazy danych
39 PostgreSQL (tak jak pygresql i popy). Zosta³ zakodowany od pocz±tku
40 z za³o¿eniem ¿e ma byæ bardzo ma³y, szybki i stabilny. G³ówna zalet±
41 psycopg jest, ¿e w jest pe³ni zgodny z standardem DBAPI-2.0 i jest
42 'thread safe' na poziomie 2.
44 %package -n Zope-%{zope_subname}
45 Summary: Zope PostgreSQL database adapter
46 Summary(pl): Interfejs bazy danych PostgreSQL do Zope
47 Group: Development/Languages/Python
48 Requires: %{name} = %{version}-%{release}
51 %description -n Zope-%{zope_subname}
52 Zope PostgreSQL database adapter.
54 %description -n Zope-%{zope_subname} -l pl
55 Interfejs bazy danych PostgreSQL do Zope.
58 %setup -q -n %{module}-%{version}
59 #%if "%{_lib}" == "lib64"
67 rm -rf $RPM_BUILD_ROOT
69 python setup.py install --optimize=2 --root=$RPM_BUILD_ROOT
71 find $RPM_BUILD_ROOT%{py_libdir} -type f -name "*.py" | xargs rm
73 #install -d $RPM_BUILD_ROOT%{_datadir}/Zope-%{zope_subname}
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 ChangeLog AUTHORS README doc/HACKING doc/SUCCESS doc/TODO
100 %dir %{py_sitedir}/%{module}
101 %attr(755,root,root) %{py_sitedir}/%{module}/*.so
102 %{py_sitedir}/%{module}/*.py[co]
104 #%files -n Zope-%{zope_subname}
105 #%defattr(644,root,root,755)
106 #%{_datadir}/Zope-%{zope_subname}