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: 5c8080d0d0568479f041bb8534caf1f8
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 # Sure, but make mx-DateTime conditional build work
36 BuildConflicts: python-egenix-mx-base
39 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
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.
56 %setup -q -n %{module}-%{version}
57 #%if "%{_lib}" == "lib64"
65 rm -rf $RPM_BUILD_ROOT
67 python setup.py install --optimize=2 --root=$RPM_BUILD_ROOT
69 find $RPM_BUILD_ROOT%{py_libdir} -type f -name "*.py" | xargs rm
72 rm -rf $RPM_BUILD_ROOT
75 %defattr(644,root,root,755)
76 %doc ChangeLog AUTHORS README doc/HACKING doc/SUCCESS doc/TODO
77 %dir %{py_sitedir}/%{module}
78 %attr(755,root,root) %{py_sitedir}/%{module}/*.so
79 %{py_sitedir}/%{module}/*.py[co]
80 %if "%{pld_release}" != "ac"
81 %{py_sitedir}/*.egg-info