]>
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} |
921d82ea | 10 | Version: 2.4.4 |
943dc275 | 11 | Release: 1 |
258ebeda | 12 | License: GPL |
4b5b5919 | 13 | Group: Libraries/Python |
853408ad | 14 | Source0: http://initd.org/psycopg/tarballs/PSYCOPG-2-4/%{module}-%{version}.tar.gz |
921d82ea | 15 | # Source0-md5: 331255d2d44018bcef2ea192aabc1d6a |
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 |
89ddf330 | 24 | Requires: python-modules |
07c88ab6 | 25 | %if "%{pld_release}" == "ac" |
54964aba | 26 | BuildRequires: python-mx-DateTime-devel |
27 | Requires: python-mx-DateTime | |
07c88ab6 | 28 | %else |
4093edd6 | 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 | |
0e0021ce | 35 | # Sure, but make mx-DateTime conditional build work |
07c88ab6 | 36 | BuildConflicts: python-egenix-mx-base |
37 | %endif | |
0e0021ce | 38 | Requires: python-pytz |
3bacd1f7 | 39 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
3bacd1f7 MK |
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 | ||
3a08e339 | 48 | %description -l pl.UTF-8 |
3bacd1f7 | 49 | psycopg jest przeznaczonym dla Pythona interfejsem do bazy danych |
3a08e339 JR |
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 | |
3bacd1f7 MK |
53 | 'thread safe' na poziomie 2. |
54 | ||
3bacd1f7 | 55 | %prep |
ad85baa5 | 56 | %setup -q -n %{module}-%{version} |
fa6eecba | 57 | #%if "%{_lib}" == "lib64" |
58 | #%patch0 -p1 | |
59 | #%endif | |
3bacd1f7 MK |
60 | |
61 | %build | |
fa6eecba | 62 | python setup.py build |
3bacd1f7 MK |
63 | |
64 | %install | |
65 | rm -rf $RPM_BUILD_ROOT | |
3bacd1f7 | 66 | |
fa6eecba | 67 | python setup.py install --optimize=2 --root=$RPM_BUILD_ROOT |
68 | ||
921d82ea MK |
69 | # find $RPM_BUILD_ROOT%{py_libdir} -type f -name "*.py" | xargs rm |
70 | %py_postclean | |
fa6eecba | 71 | |
3bacd1f7 MK |
72 | %clean |
73 | rm -rf $RPM_BUILD_ROOT | |
74 | ||
75 | %files | |
76 | %defattr(644,root,root,755) | |
943dc275 | 77 | %doc ChangeLog AUTHORS README doc/HACKING doc/SUCCESS |
fa6eecba | 78 | %dir %{py_sitedir}/%{module} |
79 | %attr(755,root,root) %{py_sitedir}/%{module}/*.so | |
80 | %{py_sitedir}/%{module}/*.py[co] | |
432cab47 | 81 | %if "%{pld_release}" != "ac" |
f53e9079 | 82 | %{py_sitedir}/*.egg-info |
df9bb384 | 83 | %endif |