]>
Commit | Line | Data |
---|---|---|
fa6eecba | 1 | # |
2 | # todo: | |
fa6eecba | 3 | # - lib64 patch |
df9bb384 | 4 | |
fa6eecba | 5 | %define module psycopg2 |
f93a45b9 | 6 | |
3bacd1f7 | 7 | Summary: psycopg is a PostgreSQL database adapter for Python |
f4a85503 | 8 | Summary(pl.UTF-8): psycopg jest przeznaczonym dla Pythona interfejsem do bazy PostgreSQL |
3bacd1f7 | 9 | Name: python-%{module} |
76b9c276 | 10 | Version: 2.0.10 |
11 | Release: 0.r407.1 | |
258ebeda | 12 | License: GPL |
4b5b5919 | 13 | Group: Libraries/Python |
76b9c276 | 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 | |
fa6eecba | 17 | #Patch0: %{name}-lib64.patch |
258ebeda | 18 | URL: http://www.initd.org/software/psycopg/ |
dd6f8fe2 | 19 | BuildRequires: autoconf |
258ebeda | 20 | BuildRequires: postgresql-backend-devel |
c72332e3 | 21 | BuildRequires: postgresql-devel |
258ebeda | 22 | BuildRequires: python-devel |
399bddde | 23 | BuildRequires: rpm-pythonprov |
258ebeda | 24 | Requires: postgresql-libs |
89ddf330 | 25 | Requires: python-modules |
54964aba | 26 | %if "%{pld_release}" == "ac" |
27 | BuildRequires: python-mx-DateTime-devel | |
28 | Requires: python-mx-DateTime | |
29 | %else | |
4093edd6 | 30 | # if somebody really needs mx.DateTime, then one can request mx.Datetime |
31 | # usage on runtime; | |
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 | |
54964aba | 36 | BuildConflicts: python-mx-DateTime |
37 | %endif | |
3bacd1f7 | 38 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
3bacd1f7 MK |
39 | |
40 | %description | |
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. | |
46 | ||
3a08e339 | 47 | %description -l pl.UTF-8 |
3bacd1f7 | 48 | psycopg jest przeznaczonym dla Pythona interfejsem do bazy danych |
3a08e339 JR |
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 | |
3bacd1f7 MK |
52 | 'thread safe' na poziomie 2. |
53 | ||
3bacd1f7 | 54 | %prep |
ad85baa5 | 55 | %setup -q -n %{module}-%{version} |
fa6eecba | 56 | #%if "%{_lib}" == "lib64" |
57 | #%patch0 -p1 | |
58 | #%endif | |
3bacd1f7 MK |
59 | |
60 | %build | |
fa6eecba | 61 | python setup.py build |
3bacd1f7 MK |
62 | |
63 | %install | |
64 | rm -rf $RPM_BUILD_ROOT | |
3bacd1f7 | 65 | |
fa6eecba | 66 | python setup.py install --optimize=2 --root=$RPM_BUILD_ROOT |
67 | ||
68 | find $RPM_BUILD_ROOT%{py_libdir} -type f -name "*.py" | xargs rm | |
69 | ||
3bacd1f7 MK |
70 | %clean |
71 | rm -rf $RPM_BUILD_ROOT | |
72 | ||
73 | %files | |
74 | %defattr(644,root,root,755) | |
fa6eecba | 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] | |
432cab47 | 79 | %if "%{pld_release}" != "ac" |
f53e9079 | 80 | %{py_sitedir}/*.egg-info |
df9bb384 | 81 | %endif |