]>
Commit | Line | Data |
---|---|---|
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.11 | |
11 | Release: 1 | |
12 | License: GPL | |
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 | |
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 | BuildConflicts: python-mx-DateTime | |
36 | %endif | |
37 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
38 | ||
39 | %description | |
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. | |
45 | ||
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. | |
52 | ||
53 | %prep | |
54 | %setup -q -n %{module}-%{version} | |
55 | #%if "%{_lib}" == "lib64" | |
56 | #%patch0 -p1 | |
57 | #%endif | |
58 | ||
59 | %build | |
60 | python setup.py build | |
61 | ||
62 | %install | |
63 | rm -rf $RPM_BUILD_ROOT | |
64 | ||
65 | python setup.py install --optimize=2 --root=$RPM_BUILD_ROOT | |
66 | ||
67 | find $RPM_BUILD_ROOT%{py_libdir} -type f -name "*.py" | xargs rm | |
68 | ||
69 | %clean | |
70 | rm -rf $RPM_BUILD_ROOT | |
71 | ||
72 | %files | |
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 | |
80 | %endif |