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