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