]> git.pld-linux.org Git - packages/python-psycopg2.git/blob - python-psycopg2.spec
ca1987d5e529a8a004eba4e9b1355afafbd9a315
[packages/python-psycopg2.git] / python-psycopg2.spec
1 #
2 # todo:
3 # - zope adapter
4 # - lib64 patch
5 #
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.
9
10 %define         module  psycopg2
11
12 Summary:        psycopg is a PostgreSQL database adapter for Python
13 Summary(pl.UTF-8):   psycopg jest przeznaczonym dla Pythona interfejsem do bazy PostgreSQL
14 Name:           python-%{module}
15 Version:        2.0.5.1
16 Release:        6
17 License:        GPL
18 Group:          Libraries/Python
19 Source0:        http://initd.org/pub/software/psycopg/%{module}-%{version}.tar.gz
20 # Source0-md5:  052e4b97dab47708fdcdc36ffb25af66
21 #Patch0:                %{name}-lib64.patch
22 URL:            http://www.initd.org/software/psycopg/
23 BuildRequires:  autoconf
24 BuildRequires:  postgresql-backend-devel
25 BuildRequires:  postgresql-devel
26 BuildRequires:  python-devel
27 BuildRequires:  rpm-pythonprov
28 # see note at the begining of the spec file
29 #BuildRequires: python-mx-DateTime-devel
30 #Requires:      python-mx-DateTime
31 Requires:       postgresql-libs
32 %pyrequires_eq  python-modules
33 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
34
35 %define zope_subname ZPsycopgDA
36
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
44 %description -l pl.UTF-8
45 psycopg jest przeznaczonym dla Pythona interfejsem do bazy danych
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
49 'thread safe' na poziomie 2.
50
51 %package -n Zope-%{zope_subname}
52 Summary:        Zope PostgreSQL database adapter
53 Summary(pl.UTF-8):   Interfejs bazy danych PostgreSQL do Zope
54 Group:          Development/Languages/Python
55 Requires:       %{name} = %{version}-%{release}
56 Requires:       Zope
57
58 %description -n Zope-%{zope_subname}
59 Zope PostgreSQL database adapter.
60
61 %description -n Zope-%{zope_subname} -l pl.UTF-8
62 Interfejs bazy danych PostgreSQL do Zope.
63
64 %prep
65 %setup -q -n %{module}-%{version}
66 #%if "%{_lib}" == "lib64"
67 #%patch0 -p1
68 #%endif
69
70 %build
71 python setup.py build
72
73 %install
74 rm -rf $RPM_BUILD_ROOT
75
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}
81
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
86
87 %clean
88 rm -rf $RPM_BUILD_ROOT
89
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
95
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
103
104 %files
105 %defattr(644,root,root,755)
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}
This page took 0.154345 seconds and 2 git commands to generate.