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: 052e4b97dab47708fdcdc36ffb25af66
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 BuildRequires: python-mx-DateTime-devel
25 BuildRequires: rpm-pythonprov
26 Requires: postgresql-libs
27 %pyrequires_eq python-modules
28 Requires: python-mx-DateTime
29 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
31 %define zope_subname ZPsycopgDA
34 psycopg is a PostgreSQL database adapter for the Python programming
35 language (just like pygresql and popy.) It was written from scratch
36 with the aim of being very small and fast, and stable as a rock. The
37 main advantages of psycopg are that it supports the full Python
38 DBAPI-2.0 and being thread safe at level 2.
41 psycopg jest przeznaczonym dla Pythona interfejsem do bazy danych
42 PostgreSQL (tak jak pygresql i popy). Zosta³ zakodowany od pocz±tku
43 z za³o¿eniem ¿e ma byæ bardzo ma³y, szybki i stabilny. G³ówna zalet±
44 psycopg jest, ¿e w jest pe³ni zgodny z standardem DBAPI-2.0 i jest
45 'thread safe' na poziomie 2.
47 %package -n Zope-%{zope_subname}
48 Summary: Zope PostgreSQL database adapter
49 Summary(pl): Interfejs bazy danych PostgreSQL do Zope
50 Group: Development/Languages/Python
51 Requires: %{name} = %{version}-%{release}
54 %description -n Zope-%{zope_subname}
55 Zope PostgreSQL database adapter.
57 %description -n Zope-%{zope_subname} -l pl
58 Interfejs bazy danych PostgreSQL do Zope.
61 %setup -q -n %{module}-%{version}
62 #%if "%{_lib}" == "lib64"
70 rm -rf $RPM_BUILD_ROOT
72 python setup.py install --optimize=2 --root=$RPM_BUILD_ROOT
74 find $RPM_BUILD_ROOT%{py_libdir} -type f -name "*.py" | xargs rm
76 #install -d $RPM_BUILD_ROOT%{_datadir}/Zope-%{zope_subname}
78 #cp -ar %{zope_subname}/* $RPM_BUILD_ROOT%{_datadir}/Zope-%{zope_subname}
79 #%py_comp $RPM_BUILD_ROOT%{_datadir}/Zope-%{zope_subname}
80 #%py_ocomp $RPM_BUILD_ROOT%{_datadir}/Zope-%{zope_subname}
81 #rm -f $RPM_BUILD_ROOT%{_datadir}/Zope-%{zope_subname}/*.py
84 rm -rf $RPM_BUILD_ROOT
86 #%post -n Zope-%{zope_subname}
87 #/usr/sbin/installzopeproduct %{_datadir}/Zope-%{zope_subname} %{zope_subname}
88 #if [ -f /var/lock/subsys/zope ]; then
89 # /etc/rc.d/init.d/zope restart >&2
92 #%postun -n Zope-%{zope_subname}
93 #if [ "$1" = "0" ]; then
94 # /usr/sbin/installzopeproduct -d %{zope_subname}
95 # if [ -f /var/lock/subsys/zope ]; then
96 # /etc/rc.d/init.d/zope restart >&2
101 %defattr(644,root,root,755)
102 %doc ChangeLog AUTHORS README doc/HACKING doc/SUCCESS doc/TODO
103 %dir %{py_sitedir}/%{module}
104 %attr(755,root,root) %{py_sitedir}/%{module}/*.so
105 %{py_sitedir}/%{module}/*.py[co]
107 #%files -n Zope-%{zope_subname}
108 #%defattr(644,root,root,755)
109 #%{_datadir}/Zope-%{zope_subname}