]> git.pld-linux.org Git - packages/python-psycopg2.git/blob - python-psycopg2.spec
- copied from python-psycopg.spec (on server side) and merged from DEVEL
[packages/python-psycopg2.git] / python-psycopg2.spec
1 #
2 # todo:
3 # - zope adapter
4 # - lib64 patch
5 #
6
7 %define         module  psycopg2
8 %define         beta    b8
9
10 Summary:        psycopg is a PostgreSQL database adapter for Python
11 Summary(pl):    psycopg jest przeznaczonym dla Pythona interfejsem do bazy PostgreSQL
12 Name:           python-%{module}
13 Version:        2.0
14 Release:        0.%{beta}.1
15 License:        GPL
16 Group:          Libraries/Python
17 Source0:        http://initd.org/pub/software/psycopg/%{module}-%{version}%{beta}.tar.gz
18 # Source0-md5:  f16d464e184351cac9c11814501083bc
19 #Patch0:                %{name}-lib64.patch
20 URL:            http://www.initd.org/software/psycopg/
21 BuildRequires:  autoconf
22 BuildRequires:  postgresql-backend-devel
23 BuildRequires:  postgresql-devel
24 BuildRequires:  python-devel
25 Requires:       postgresql-libs
26 %pyrequires_eq  python-modules
27 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
28
29 %define zope_subname ZPsycopgDA
30
31 %description
32 psycopg is a PostgreSQL database adapter for the Python programming
33 language (just like pygresql and popy.) It was written from scratch
34 with the aim of being very small and fast, and stable as a rock. The
35 main advantages of psycopg are that it supports the full Python
36 DBAPI-2.0 and being thread safe at level 2.
37
38 %description -l pl
39 psycopg jest przeznaczonym dla Pythona interfejsem do bazy danych
40 PostgreSQL (tak jak pygresql i popy). Zosta³ zakodowany od pocz±tku
41 z za³o¿eniem ¿e ma byæ bardzo ma³y, szybki i stabilny. G³ówna zalet±
42 psycopg jest, ¿e w jest pe³ni zgodny z standardem DBAPI-2.0 i jest
43 'thread safe' na poziomie 2.
44
45 %package -n Zope-%{zope_subname}
46 Summary:        Zope PostgreSQL database adapter
47 Summary(pl):    Interfejs bazy danych PostgreSQL do Zope
48 Group:          Development/Languages/Python
49 Requires:       %{name} = %{version}-%{release}
50 Requires:       Zope
51
52 %description -n Zope-%{zope_subname}
53 Zope PostgreSQL database adapter.
54
55 %description -n Zope-%{zope_subname} -l pl
56 Interfejs bazy danych PostgreSQL do Zope.
57
58 %prep
59 %setup -q -n %{module}-%{version}%{beta}
60 #%if "%{_lib}" == "lib64"
61 #%patch0 -p1
62 #%endif
63
64 %build
65 python setup.py build
66
67 %install
68 rm -rf $RPM_BUILD_ROOT
69
70 python setup.py install --optimize=2 --root=$RPM_BUILD_ROOT
71
72 find $RPM_BUILD_ROOT%{py_libdir} -type f -name "*.py" | xargs rm
73
74 #install -d $RPM_BUILD_ROOT%{_datadir}/Zope-%{zope_subname}
75
76 #cp -ar %{zope_subname}/* $RPM_BUILD_ROOT%{_datadir}/Zope-%{zope_subname}
77 #%py_comp $RPM_BUILD_ROOT%{_datadir}/Zope-%{zope_subname}
78 #%py_ocomp $RPM_BUILD_ROOT%{_datadir}/Zope-%{zope_subname}
79 #rm -f $RPM_BUILD_ROOT%{_datadir}/Zope-%{zope_subname}/*.py
80
81 %clean
82 rm -rf $RPM_BUILD_ROOT
83
84 #%post -n Zope-%{zope_subname}
85 #/usr/sbin/installzopeproduct %{_datadir}/Zope-%{zope_subname} %{zope_subname}
86 #if [ -f /var/lock/subsys/zope ]; then
87 #       /etc/rc.d/init.d/zope restart >&2
88 #fi
89
90 #%postun -n Zope-%{zope_subname}
91 #if [ "$1" = "0" ]; then
92 #       /usr/sbin/installzopeproduct -d %{zope_subname} 
93 #       if [ -f /var/lock/subsys/zope ]; then
94 #               /etc/rc.d/init.d/zope restart >&2
95 #       fi
96 #fi
97
98 %files
99 %defattr(644,root,root,755)
100 %doc ChangeLog AUTHORS README doc/HACKING doc/SUCCESS doc/TODO
101 %dir %{py_sitedir}/%{module}
102 %attr(755,root,root) %{py_sitedir}/%{module}/*.so
103 %{py_sitedir}/%{module}/*.py[co]
104
105 #%files -n Zope-%{zope_subname}
106 #%defattr(644,root,root,755)
107 #%{_datadir}/Zope-%{zope_subname}
This page took 0.286234 seconds and 4 git commands to generate.