7 %define module psycopg2
10 Summary: psycopg is a PostgreSQL database adapter for Python
11 Summary(pl): psycopg jest przeznaczonym dla Pythona interfejsem do bazy PostgreSQL
12 Name: python-%{module}
16 Group: Libraries/Python
17 Source0: http://initd.org/pub/software/psycopg/%{module}-%{version}%{beta}.tar.gz
18 # Source0-md5: f16d464e184351cac9c11814501083bc
19 #Patch0: %{name}-lib64.patch
20 URL: http://www.initd.org/software/psycopg/
21 BuildRequires: autoconf
22 BuildRequires: postgresql-backend-devel
23 BuildRequires: postgresql-devel
24 BuildRequires: python-devel
25 Requires: postgresql-libs
26 %pyrequires_eq python-modules
27 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
29 %define zope_subname ZPsycopgDA
32 psycopg is a PostgreSQL database adapter for the Python programming
33 language (just like pygresql and popy.) It was written from scratch
34 with the aim of being very small and fast, and stable as a rock. The
35 main advantages of psycopg are that it supports the full Python
36 DBAPI-2.0 and being thread safe at level 2.
39 psycopg jest przeznaczonym dla Pythona interfejsem do bazy danych
40 PostgreSQL (tak jak pygresql i popy). Zosta³ zakodowany od pocz±tku
41 z za³o¿eniem ¿e ma byæ bardzo ma³y, szybki i stabilny. G³ówna zalet±
42 psycopg jest, ¿e w jest pe³ni zgodny z standardem DBAPI-2.0 i jest
43 'thread safe' na poziomie 2.
45 %package -n Zope-%{zope_subname}
46 Summary: Zope PostgreSQL database adapter
47 Summary(pl): Interfejs bazy danych PostgreSQL do Zope
48 Group: Development/Languages/Python
49 Requires: %{name} = %{version}-%{release}
52 %description -n Zope-%{zope_subname}
53 Zope PostgreSQL database adapter.
55 %description -n Zope-%{zope_subname} -l pl
56 Interfejs bazy danych PostgreSQL do Zope.
59 %setup -q -n %{module}-%{version}%{beta}
60 #%if "%{_lib}" == "lib64"
68 rm -rf $RPM_BUILD_ROOT
70 python setup.py install --optimize=2 --root=$RPM_BUILD_ROOT
72 find $RPM_BUILD_ROOT%{py_libdir} -type f -name "*.py" | xargs rm
74 #install -d $RPM_BUILD_ROOT%{_datadir}/Zope-%{zope_subname}
76 #cp -ar %{zope_subname}/* $RPM_BUILD_ROOT%{_datadir}/Zope-%{zope_subname}
77 #%py_comp $RPM_BUILD_ROOT%{_datadir}/Zope-%{zope_subname}
78 #%py_ocomp $RPM_BUILD_ROOT%{_datadir}/Zope-%{zope_subname}
79 #rm -f $RPM_BUILD_ROOT%{_datadir}/Zope-%{zope_subname}/*.py
82 rm -rf $RPM_BUILD_ROOT
84 #%post -n Zope-%{zope_subname}
85 #/usr/sbin/installzopeproduct %{_datadir}/Zope-%{zope_subname} %{zope_subname}
86 #if [ -f /var/lock/subsys/zope ]; then
87 # /etc/rc.d/init.d/zope restart >&2
90 #%postun -n Zope-%{zope_subname}
91 #if [ "$1" = "0" ]; then
92 # /usr/sbin/installzopeproduct -d %{zope_subname}
93 # if [ -f /var/lock/subsys/zope ]; then
94 # /etc/rc.d/init.d/zope restart >&2
99 %defattr(644,root,root,755)
100 %doc ChangeLog AUTHORS README doc/HACKING doc/SUCCESS doc/TODO
101 %dir %{py_sitedir}/%{module}
102 %attr(755,root,root) %{py_sitedir}/%{module}/*.so
103 %{py_sitedir}/%{module}/*.py[co]
105 #%files -n Zope-%{zope_subname}
106 #%defattr(644,root,root,755)
107 #%{_datadir}/Zope-%{zope_subname}