5 %define module psycopg2
7 Summary: psycopg is a PostgreSQL database adapter for Python
8 Summary(pl.UTF-8): psycopg jest przeznaczonym dla Pythona interfejsem do bazy PostgreSQL
13 Group: Libraries/Python
14 #Source0: http://initd.org/pub/software/psycopg/%{module}-%{version}.tar.gz
15 Source0: http://initd.org/pub/software/psycopg/%{module}-r407.tar.gz
16 # Source0-md5: 463a684a427a71f894f74d8502e68c8d
17 #Patch0: %{name}-lib64.patch
18 URL: http://www.initd.org/software/psycopg/
19 BuildRequires: autoconf
20 BuildRequires: postgresql-backend-devel
21 BuildRequires: postgresql-devel
22 BuildRequires: python-devel
23 BuildRequires: rpm-pythonprov
24 Requires: postgresql-libs
25 Requires: python-modules
26 %if "%{pld_release}" == "ac"
27 BuildRequires: python-mx-DateTime-devel
28 Requires: python-mx-DateTime
30 # if somebody really needs mx.DateTime, then one can request mx.Datetime
32 # it is pointless to use 'Requires' or 'Suggest' field because
33 # - python provides its own datetime implementation
34 # - one can request it on runtime (as said above)
35 # - usage of mx.DateTime type is application specific
36 BuildConflicts: python-mx-DateTime
38 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
41 psycopg is a PostgreSQL database adapter for the Python programming
42 language (just like pygresql and popy.) It was written from scratch
43 with the aim of being very small and fast, and stable as a rock. The
44 main advantages of psycopg are that it supports the full Python
45 DBAPI-2.0 and being thread safe at level 2.
47 %description -l pl.UTF-8
48 psycopg jest przeznaczonym dla Pythona interfejsem do bazy danych
49 PostgreSQL (tak jak pygresql i popy). Został zakodowany od początku
50 z założeniem że ma być bardzo mały, szybki i stabilny. Główna zaletą
51 psycopg jest, że w jest pełni zgodny z standardem DBAPI-2.0 i jest
52 'thread safe' na poziomie 2.
55 %setup -q -n %{module}-%{version}
56 #%if "%{_lib}" == "lib64"
64 rm -rf $RPM_BUILD_ROOT
66 python setup.py install --optimize=2 --root=$RPM_BUILD_ROOT
68 find $RPM_BUILD_ROOT%{py_libdir} -type f -name "*.py" | xargs rm
71 rm -rf $RPM_BUILD_ROOT
74 %defattr(644,root,root,755)
75 %doc ChangeLog AUTHORS README doc/HACKING doc/SUCCESS doc/TODO
76 %dir %{py_sitedir}/%{module}
77 %attr(755,root,root) %{py_sitedir}/%{module}/*.so
78 %{py_sitedir}/%{module}/*.py[co]
79 %if "%{pld_release}" != "ac"
80 %{py_sitedir}/*.egg-info