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