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 # Version 2.0.8 builds well with both datetime and mx.DateTime
11 # By default uses datetime
12 # If sb really needs version _without_ mx pls do it on your own
13 # with without_mx bcond
15 %define module psycopg2
17 Summary: psycopg is a PostgreSQL database adapter for Python
18 Summary(pl.UTF-8): psycopg jest przeznaczonym dla Pythona interfejsem do bazy PostgreSQL
19 Name: python-%{module}
23 Group: Libraries/Python
24 Source0: http://initd.org/pub/software/psycopg/%{module}-%{version}.tar.gz
25 # Source0-md5: 2c31827878d436b0c89e777989ff55af
26 #Patch0: %{name}-lib64.patch
27 URL: http://www.initd.org/software/psycopg/
28 BuildRequires: autoconf
29 BuildRequires: postgresql-backend-devel
30 BuildRequires: postgresql-devel
31 BuildRequires: python-devel
32 BuildRequires: rpm-pythonprov
33 BuildRequires: python-mx-DateTime-devel
34 Requires: python-mx-DateTime
35 Requires: postgresql-libs
36 %pyrequires_eq python-modules
37 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
39 %define zope_subname ZPsycopgDA
42 psycopg is a PostgreSQL database adapter for the Python programming
43 language (just like pygresql and popy.) It was written from scratch
44 with the aim of being very small and fast, and stable as a rock. The
45 main advantages of psycopg are that it supports the full Python
46 DBAPI-2.0 and being thread safe at level 2.
48 %description -l pl.UTF-8
49 psycopg jest przeznaczonym dla Pythona interfejsem do bazy danych
50 PostgreSQL (tak jak pygresql i popy). Został zakodowany od początku
51 z założeniem że ma być bardzo mały, szybki i stabilny. Główna zaletą
52 psycopg jest, że w jest pełni zgodny z standardem DBAPI-2.0 i jest
53 'thread safe' na poziomie 2.
55 %package -n Zope-%{zope_subname}
56 Summary: Zope PostgreSQL database adapter
57 Summary(pl.UTF-8): Interfejs bazy danych PostgreSQL do Zope
58 Group: Development/Languages/Python
59 Requires: %{name} = %{version}-%{release}
62 %description -n Zope-%{zope_subname}
63 Zope PostgreSQL database adapter.
65 %description -n Zope-%{zope_subname} -l pl.UTF-8
66 Interfejs bazy danych PostgreSQL do Zope.
69 %setup -q -n %{module}-%{version}
70 #%if "%{_lib}" == "lib64"
78 rm -rf $RPM_BUILD_ROOT
80 python setup.py install --optimize=2 --root=$RPM_BUILD_ROOT
82 find $RPM_BUILD_ROOT%{py_libdir} -type f -name "*.py" | xargs rm
84 #install -d $RPM_BUILD_ROOT%{_datadir}/Zope-%{zope_subname}
86 #cp -ar %{zope_subname}/* $RPM_BUILD_ROOT%{_datadir}/Zope-%{zope_subname}
87 #%py_comp $RPM_BUILD_ROOT%{_datadir}/Zope-%{zope_subname}
88 #%py_ocomp $RPM_BUILD_ROOT%{_datadir}/Zope-%{zope_subname}
89 #rm -f $RPM_BUILD_ROOT%{_datadir}/Zope-%{zope_subname}/*.py
92 rm -rf $RPM_BUILD_ROOT
94 #%post -n Zope-%{zope_subname}
95 #/usr/sbin/installzopeproduct %{_datadir}/Zope-%{zope_subname} %{zope_subname}
96 #if [ -f /var/lock/subsys/zope ]; then
97 # /etc/rc.d/init.d/zope restart >&2
100 #%postun -n Zope-%{zope_subname}
101 #if [ "$1" = "0" ]; then
102 # /usr/sbin/installzopeproduct -d %{zope_subname}
103 # if [ -f /var/lock/subsys/zope ]; then
104 # /etc/rc.d/init.d/zope restart >&2
109 %defattr(644,root,root,755)
110 %doc ChangeLog AUTHORS README doc/HACKING doc/SUCCESS doc/TODO
111 %dir %{py_sitedir}/%{module}
112 %attr(755,root,root) %{py_sitedir}/%{module}/*.so
113 %{py_sitedir}/%{module}/*.py[co]
114 %if "%{py_ver}" > "2.4"
115 %{py_sitedir}/*.egg-info
118 #%files -n Zope-%{zope_subname}
119 #%defattr(644,root,root,755)
120 #%{_datadir}/Zope-%{zope_subname}