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