]> git.pld-linux.org Git - packages/python-psycopg2.git/blob - python-psycopg2.spec
3802f7185803c4947fd2100ea0e9e8aaadcd5148
[packages/python-psycopg2.git] / python-psycopg2.spec
1 #
2 # Conditional build:
3 %bcond_with mx  # build with egenix mx datetime support
4 #
5 # todo:
6 # - zope adapter
7 # - lib64 patch
8 #
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.
12
13 %define         module  psycopg2
14
15 Summary:        psycopg is a PostgreSQL database adapter for Python
16 Summary(pl.UTF-8):      psycopg jest przeznaczonym dla Pythona interfejsem do bazy PostgreSQL
17 Name:           python-%{module}
18 Version:        2.0.8
19 Release:        2
20 License:        GPL
21 Group:          Libraries/Python
22 Source0:        http://initd.org/pub/software/psycopg/%{module}-%{version}.tar.gz
23 # Source0-md5:  2c31827878d436b0c89e777989ff55af
24 #Patch0:                %{name}-lib64.patch
25 URL:            http://www.initd.org/software/psycopg/
26 BuildRequires:  autoconf
27 BuildRequires:  postgresql-backend-devel
28 BuildRequires:  postgresql-devel
29 BuildRequires:  python-devel
30 BuildRequires:  rpm-pythonprov
31 %if %{with mx}
32 BuildRequires:  python-mx-DateTime-devel
33 Requires:       python-mx-DateTime
34 %else
35 BuildConflicts: python-mx-DateTime
36 %endif
37 Requires:       postgresql-libs
38 %pyrequires_eq  python-modules
39 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
40
41 %define zope_subname ZPsycopgDA
42
43 %description
44 psycopg is a PostgreSQL database adapter for the Python programming
45 language (just like pygresql and popy.) It was written from scratch
46 with the aim of being very small and fast, and stable as a rock. The
47 main advantages of psycopg are that it supports the full Python
48 DBAPI-2.0 and being thread safe at level 2.
49
50 %description -l pl.UTF-8
51 psycopg jest przeznaczonym dla Pythona interfejsem do bazy danych
52 PostgreSQL (tak jak pygresql i popy). Został zakodowany od początku
53 z założeniem że ma być bardzo mały, szybki i stabilny. Główna zaletą
54 psycopg jest, że w jest pełni zgodny z standardem DBAPI-2.0 i jest
55 'thread safe' na poziomie 2.
56
57 %package -n Zope-%{zope_subname}
58 Summary:        Zope PostgreSQL database adapter
59 Summary(pl.UTF-8):      Interfejs bazy danych PostgreSQL do Zope
60 Group:          Development/Languages/Python
61 Requires:       %{name} = %{version}-%{release}
62 Requires:       Zope
63
64 %description -n Zope-%{zope_subname}
65 Zope PostgreSQL database adapter.
66
67 %description -n Zope-%{zope_subname} -l pl.UTF-8
68 Interfejs bazy danych PostgreSQL do Zope.
69
70 %prep
71 %setup -q -n %{module}-%{version}
72 #%if "%{_lib}" == "lib64"
73 #%patch0 -p1
74 #%endif
75
76 %build
77 python setup.py build
78
79 %install
80 rm -rf $RPM_BUILD_ROOT
81
82 python setup.py install --optimize=2 --root=$RPM_BUILD_ROOT
83
84 find $RPM_BUILD_ROOT%{py_libdir} -type f -name "*.py" | xargs rm
85
86 #install -d $RPM_BUILD_ROOT%{_datadir}/Zope-%{zope_subname}
87
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
92
93 %clean
94 rm -rf $RPM_BUILD_ROOT
95
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
101
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
109
110 %files
111 %defattr(644,root,root,755)
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]
116 %{py_sitedir}/*.egg-info
117
118 #%files -n Zope-%{zope_subname}
119 #%defattr(644,root,root,755)
120 #%{_datadir}/Zope-%{zope_subname}
This page took 0.05429 seconds and 2 git commands to generate.