]> git.pld-linux.org Git - packages/python-psycopg2.git/blob - python-psycopg2.spec
- release 2
[packages/python-psycopg2.git] / python-psycopg2.spec
1 #
2 # todo:
3 # - lib64 patch
4
5 %define         module  psycopg2
6
7 Summary:        psycopg is a PostgreSQL database adapter for Python
8 Summary(pl.UTF-8):      psycopg jest przeznaczonym dla Pythona interfejsem do bazy PostgreSQL
9 Name:           python-%{module}
10 Version:        2.0.12
11 Release:        2
12 License:        GPL
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
28 %else
29 # if somebody really needs mx.DateTime, then one can request mx.Datetime
30 # usage on runtime;
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
37 %endif
38 Requires:       python-pytz
39 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
40
41 %description
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.
47
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.
54
55 %prep
56 %setup -q -n %{module}-%{version}
57 #%if "%{_lib}" == "lib64"
58 #%patch0 -p1
59 #%endif
60
61 %build
62 python setup.py build
63
64 %install
65 rm -rf $RPM_BUILD_ROOT
66
67 python setup.py install --optimize=2 --root=$RPM_BUILD_ROOT
68
69 find $RPM_BUILD_ROOT%{py_libdir} -type f -name "*.py" | xargs rm
70
71 %clean
72 rm -rf $RPM_BUILD_ROOT
73
74 %files
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
82 %endif
This page took 0.056322 seconds and 3 git commands to generate.