]>
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} |
dbbbd4ba | 10 | Version: 2.0.8 |
432cab47 | 11 | Release: 5 |
258ebeda | 12 | License: GPL |
4b5b5919 | 13 | Group: Libraries/Python |
dd6f52dd | 14 | Source0: http://initd.org/pub/software/psycopg/%{module}-%{version}.tar.gz |
dbbbd4ba | 15 | # Source0-md5: 2c31827878d436b0c89e777989ff55af |
fa6eecba | 16 | #Patch0: %{name}-lib64.patch |
258ebeda | 17 | URL: http://www.initd.org/software/psycopg/ |
dd6f8fe2 | 18 | BuildRequires: autoconf |
258ebeda | 19 | BuildRequires: postgresql-backend-devel |
c72332e3 | 20 | BuildRequires: postgresql-devel |
258ebeda | 21 | BuildRequires: python-devel |
399bddde | 22 | BuildRequires: rpm-pythonprov |
258ebeda | 23 | Requires: postgresql-libs |
44843cf9 | 24 | %pyrequires_eq python-modules |
54964aba | 25 | %if "%{pld_release}" == "ac" |
26 | BuildRequires: python-mx-DateTime-devel | |
27 | Requires: python-mx-DateTime | |
28 | %else | |
29 | # allow mx.DateTime to be optional | |
f2a23dc0 | 30 | # don't use Suggest - it is rare to use mx.DateTime; python provides its |
31 | # own datetime implementation, now | |
54964aba | 32 | BuildConflicts: python-mx-DateTime |
33 | %endif | |
3bacd1f7 | 34 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
3bacd1f7 MK |
35 | |
36 | %description | |
37 | psycopg is a PostgreSQL database adapter for the Python programming | |
38 | language (just like pygresql and popy.) It was written from scratch | |
39 | with the aim of being very small and fast, and stable as a rock. The | |
40 | main advantages of psycopg are that it supports the full Python | |
41 | DBAPI-2.0 and being thread safe at level 2. | |
42 | ||
3a08e339 | 43 | %description -l pl.UTF-8 |
3bacd1f7 | 44 | psycopg jest przeznaczonym dla Pythona interfejsem do bazy danych |
3a08e339 JR |
45 | PostgreSQL (tak jak pygresql i popy). Został zakodowany od początku |
46 | z założeniem że ma być bardzo mały, szybki i stabilny. Główna zaletą | |
47 | psycopg jest, że w jest pełni zgodny z standardem DBAPI-2.0 i jest | |
3bacd1f7 MK |
48 | 'thread safe' na poziomie 2. |
49 | ||
3bacd1f7 | 50 | %prep |
ad85baa5 | 51 | %setup -q -n %{module}-%{version} |
fa6eecba | 52 | #%if "%{_lib}" == "lib64" |
53 | #%patch0 -p1 | |
54 | #%endif | |
3bacd1f7 MK |
55 | |
56 | %build | |
fa6eecba | 57 | python setup.py build |
3bacd1f7 MK |
58 | |
59 | %install | |
60 | rm -rf $RPM_BUILD_ROOT | |
3bacd1f7 | 61 | |
fa6eecba | 62 | python setup.py install --optimize=2 --root=$RPM_BUILD_ROOT |
63 | ||
64 | find $RPM_BUILD_ROOT%{py_libdir} -type f -name "*.py" | xargs rm | |
65 | ||
3bacd1f7 MK |
66 | %clean |
67 | rm -rf $RPM_BUILD_ROOT | |
68 | ||
69 | %files | |
70 | %defattr(644,root,root,755) | |
fa6eecba | 71 | %doc ChangeLog AUTHORS README doc/HACKING doc/SUCCESS doc/TODO |
72 | %dir %{py_sitedir}/%{module} | |
73 | %attr(755,root,root) %{py_sitedir}/%{module}/*.so | |
74 | %{py_sitedir}/%{module}/*.py[co] | |
432cab47 | 75 | %if "%{pld_release}" != "ac" |
f53e9079 | 76 | %{py_sitedir}/*.egg-info |
df9bb384 | 77 | %endif |