6 # WARNING! Please note, that mx.DateTime is optional. You can use
7 # mx.DateTime with your apps, but other see datetime datatype more
8 # suitable for date and time as it is standard in Python.
10 %define module psycopg2
12 Summary: psycopg is a PostgreSQL database adapter for Python
13 Summary(pl.UTF-8): psycopg jest przeznaczonym dla Pythona interfejsem do bazy PostgreSQL
14 Name: python-%{module}
18 Group: Libraries/Python
19 Source0: http://initd.org/pub/software/psycopg/%{module}-%{version}.tar.gz
20 # Source0-md5: 052e4b97dab47708fdcdc36ffb25af66
21 #Patch0: %{name}-lib64.patch
22 URL: http://www.initd.org/software/psycopg/
23 BuildRequires: autoconf
24 BuildRequires: postgresql-backend-devel
25 BuildRequires: postgresql-devel
26 BuildRequires: python-devel
27 BuildRequires: rpm-pythonprov
28 # see note at the begining of the spec file
29 #BuildRequires: python-mx-DateTime-devel
30 #Requires: python-mx-DateTime
31 Requires: postgresql-libs
32 %pyrequires_eq python-modules
33 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
35 %define zope_subname ZPsycopgDA
38 psycopg is a PostgreSQL database adapter for the Python programming
39 language (just like pygresql and popy.) It was written from scratch
40 with the aim of being very small and fast, and stable as a rock. The
41 main advantages of psycopg are that it supports the full Python
42 DBAPI-2.0 and being thread safe at level 2.
44 %description -l pl.UTF-8
45 psycopg jest przeznaczonym dla Pythona interfejsem do bazy danych
46 PostgreSQL (tak jak pygresql i popy). Został zakodowany od początku
47 z założeniem że ma być bardzo mały, szybki i stabilny. Główna zaletą
48 psycopg jest, że w jest pełni zgodny z standardem DBAPI-2.0 i jest
49 'thread safe' na poziomie 2.
51 %package -n Zope-%{zope_subname}
52 Summary: Zope PostgreSQL database adapter
53 Summary(pl.UTF-8): Interfejs bazy danych PostgreSQL do Zope
54 Group: Development/Languages/Python
55 Requires: %{name} = %{version}-%{release}
58 %description -n Zope-%{zope_subname}
59 Zope PostgreSQL database adapter.
61 %description -n Zope-%{zope_subname} -l pl.UTF-8
62 Interfejs bazy danych PostgreSQL do Zope.
65 %setup -q -n %{module}-%{version}
66 #%if "%{_lib}" == "lib64"
74 rm -rf $RPM_BUILD_ROOT
76 python setup.py install --optimize=2 --root=$RPM_BUILD_ROOT
78 find $RPM_BUILD_ROOT%{py_libdir} -type f -name "*.py" | xargs rm
80 #install -d $RPM_BUILD_ROOT%{_datadir}/Zope-%{zope_subname}
82 #cp -ar %{zope_subname}/* $RPM_BUILD_ROOT%{_datadir}/Zope-%{zope_subname}
83 #%py_comp $RPM_BUILD_ROOT%{_datadir}/Zope-%{zope_subname}
84 #%py_ocomp $RPM_BUILD_ROOT%{_datadir}/Zope-%{zope_subname}
85 #rm -f $RPM_BUILD_ROOT%{_datadir}/Zope-%{zope_subname}/*.py
88 rm -rf $RPM_BUILD_ROOT
90 #%post -n Zope-%{zope_subname}
91 #/usr/sbin/installzopeproduct %{_datadir}/Zope-%{zope_subname} %{zope_subname}
92 #if [ -f /var/lock/subsys/zope ]; then
93 # /etc/rc.d/init.d/zope restart >&2
96 #%postun -n Zope-%{zope_subname}
97 #if [ "$1" = "0" ]; then
98 # /usr/sbin/installzopeproduct -d %{zope_subname}
99 # if [ -f /var/lock/subsys/zope ]; then
100 # /etc/rc.d/init.d/zope restart >&2
105 %defattr(644,root,root,755)
106 %doc ChangeLog AUTHORS README doc/HACKING doc/SUCCESS doc/TODO
107 %dir %{py_sitedir}/%{module}
108 %attr(755,root,root) %{py_sitedir}/%{module}/*.so
109 %{py_sitedir}/%{module}/*.py[co]
111 #%files -n Zope-%{zope_subname}
112 #%defattr(644,root,root,755)
113 #%{_datadir}/Zope-%{zope_subname}