]>
Commit | Line | Data |
---|---|---|
fa6eecba | 1 | # |
2 | # todo: | |
3 | # - zope adapter | |
4 | # - lib64 patch | |
5 | # | |
50248341 | 6 | # WARNING! Please note, that mx.DateTime is optional. You can use |
7 | # mx.DateTime with your apps, but other see datetime datatype more | |
8 | # suitable for date and time as it is standard in Python. | |
f93a45b9 | 9 | |
fa6eecba | 10 | %define module psycopg2 |
f93a45b9 | 11 | |
3bacd1f7 | 12 | Summary: psycopg is a PostgreSQL database adapter for Python |
f4a85503 | 13 | Summary(pl.UTF-8): psycopg jest przeznaczonym dla Pythona interfejsem do bazy PostgreSQL |
3bacd1f7 | 14 | Name: python-%{module} |
c5fa98ad | 15 | Version: 2.0.5.1 |
9cfdd4e9 | 16 | Release: 6 |
258ebeda | 17 | License: GPL |
4b5b5919 | 18 | Group: Libraries/Python |
dd6f52dd | 19 | Source0: http://initd.org/pub/software/psycopg/%{module}-%{version}.tar.gz |
c5fa98ad | 20 | # Source0-md5: 052e4b97dab47708fdcdc36ffb25af66 |
fa6eecba | 21 | #Patch0: %{name}-lib64.patch |
258ebeda | 22 | URL: http://www.initd.org/software/psycopg/ |
dd6f8fe2 | 23 | BuildRequires: autoconf |
258ebeda | 24 | BuildRequires: postgresql-backend-devel |
c72332e3 | 25 | BuildRequires: postgresql-devel |
258ebeda | 26 | BuildRequires: python-devel |
399bddde | 27 | BuildRequires: rpm-pythonprov |
50248341 | 28 | # see note at the begining of the spec file |
84a640a1 | 29 | BuildRequires: python-mx-DateTime-devel |
30 | Requires: python-mx-DateTime | |
258ebeda | 31 | Requires: postgresql-libs |
44843cf9 | 32 | %pyrequires_eq python-modules |
3bacd1f7 | 33 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
3bacd1f7 | 34 | |
f1720923 | 35 | %define zope_subname ZPsycopgDA |
e8c205e6 | 36 | |
3bacd1f7 MK |
37 | %description |
38 | psycopg is a PostgreSQL database adapter for the Python programming | |
39 | language (just like pygresql and popy.) It was written from scratch | |
40 | with the aim of being very small and fast, and stable as a rock. The | |
41 | main advantages of psycopg are that it supports the full Python | |
42 | DBAPI-2.0 and being thread safe at level 2. | |
43 | ||
3a08e339 | 44 | %description -l pl.UTF-8 |
3bacd1f7 | 45 | psycopg jest przeznaczonym dla Pythona interfejsem do bazy danych |
3a08e339 JR |
46 | PostgreSQL (tak jak pygresql i popy). Został zakodowany od początku |
47 | z założeniem że ma być bardzo mały, szybki i stabilny. Główna zaletą | |
48 | psycopg jest, że w jest pełni zgodny z standardem DBAPI-2.0 i jest | |
3bacd1f7 MK |
49 | 'thread safe' na poziomie 2. |
50 | ||
f1720923 | 51 | %package -n Zope-%{zope_subname} |
e8c205e6 | 52 | Summary: Zope PostgreSQL database adapter |
f4a85503 | 53 | Summary(pl.UTF-8): Interfejs bazy danych PostgreSQL do Zope |
e8c205e6 | 54 | Group: Development/Languages/Python |
ea893739 | 55 | Requires: %{name} = %{version}-%{release} |
e8c205e6 | 56 | Requires: Zope |
e8c205e6 | 57 | |
f1720923 | 58 | %description -n Zope-%{zope_subname} |
e8c205e6 JK |
59 | Zope PostgreSQL database adapter. |
60 | ||
3a08e339 | 61 | %description -n Zope-%{zope_subname} -l pl.UTF-8 |
e8c205e6 JK |
62 | Interfejs bazy danych PostgreSQL do Zope. |
63 | ||
3bacd1f7 | 64 | %prep |
ad85baa5 | 65 | %setup -q -n %{module}-%{version} |
fa6eecba | 66 | #%if "%{_lib}" == "lib64" |
67 | #%patch0 -p1 | |
68 | #%endif | |
3bacd1f7 MK |
69 | |
70 | %build | |
fa6eecba | 71 | python setup.py build |
3bacd1f7 MK |
72 | |
73 | %install | |
74 | rm -rf $RPM_BUILD_ROOT | |
3bacd1f7 | 75 | |
fa6eecba | 76 | python setup.py install --optimize=2 --root=$RPM_BUILD_ROOT |
77 | ||
78 | find $RPM_BUILD_ROOT%{py_libdir} -type f -name "*.py" | xargs rm | |
79 | ||
80 | #install -d $RPM_BUILD_ROOT%{_datadir}/Zope-%{zope_subname} | |
3bacd1f7 | 81 | |
fa6eecba | 82 | #cp -ar %{zope_subname}/* $RPM_BUILD_ROOT%{_datadir}/Zope-%{zope_subname} |
83 | #%py_comp $RPM_BUILD_ROOT%{_datadir}/Zope-%{zope_subname} | |
84 | #%py_ocomp $RPM_BUILD_ROOT%{_datadir}/Zope-%{zope_subname} | |
85 | #rm -f $RPM_BUILD_ROOT%{_datadir}/Zope-%{zope_subname}/*.py | |
e8c205e6 | 86 | |
3bacd1f7 MK |
87 | %clean |
88 | rm -rf $RPM_BUILD_ROOT | |
89 | ||
fa6eecba | 90 | #%post -n Zope-%{zope_subname} |
91 | #/usr/sbin/installzopeproduct %{_datadir}/Zope-%{zope_subname} %{zope_subname} | |
92 | #if [ -f /var/lock/subsys/zope ]; then | |
93 | # /etc/rc.d/init.d/zope restart >&2 | |
94 | #fi | |
f1720923 | 95 | |
fa6eecba | 96 | #%postun -n Zope-%{zope_subname} |
97 | #if [ "$1" = "0" ]; then | |
98 | # /usr/sbin/installzopeproduct -d %{zope_subname} | |
99 | # if [ -f /var/lock/subsys/zope ]; then | |
100 | # /etc/rc.d/init.d/zope restart >&2 | |
101 | # fi | |
102 | #fi | |
f1720923 | 103 | |
3bacd1f7 MK |
104 | %files |
105 | %defattr(644,root,root,755) | |
fa6eecba | 106 | %doc ChangeLog AUTHORS README doc/HACKING doc/SUCCESS doc/TODO |
107 | %dir %{py_sitedir}/%{module} | |
108 | %attr(755,root,root) %{py_sitedir}/%{module}/*.so | |
109 | %{py_sitedir}/%{module}/*.py[co] | |
110 | ||
111 | #%files -n Zope-%{zope_subname} | |
112 | #%defattr(644,root,root,755) | |
113 | #%{_datadir}/Zope-%{zope_subname} |