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