]> git.pld-linux.org Git - packages/python-psycopg2.git/blob - python-psycopg2.spec
- BR: autoconf
[packages/python-psycopg2.git] / python-psycopg2.spec
1
2 %include        /usr/lib/rpm/macros.python
3 %define         module psycopg
4
5 Summary:        psycopg is a PostgreSQL database adapter for Python
6 Summary(pl):    psycopg jest przeznaczonym dla Pythona interfejsem do bazy PostgreSQL
7 Name:           python-%{module}
8 Version:        1.1.10
9 Release:        2
10 License:        GPL
11 Group:          Libraries/Python
12 Source0:        http://initd.org/pub/software/%{module}/%{module}-%{version}.tar.gz
13 # Source0-md5:  2279a6aaddf8a8fbec44f782e5cdaa02
14 Patch0:         %{name}-dumb-ac-fix.patch
15 URL:            http://www.initd.org/software/psycopg/
16 BuildRequires:  autoconf
17 BuildRequires:  postgresql-backend-devel
18 BuildRequires:  python-devel
19 BuildRequires:  python-mx-DateTime-devel
20 Requires:       postgresql-libs
21 %pyrequires_eq  python-modules
22 Requires:       python-mx-DateTime
23 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
24
25 %define prod_name ZPsycopgDA
26 %define zope_dir           %{_libdir}/zope
27 %define zope_productsdir   %{zope_dir}/Products
28 %define python_compile_opt python -O -c "import compileall; compileall.compile_dir('.')"
29 %define python_compile     python -c "import compileall; compileall.compile_dir('.')"
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-%{prod_name}
46 Summary:        Zope PostgreSQL database adapter
47 Summary(pl):    Interfejs bazy danych PostgreSQL do Zope
48 Group:          Development/Languages/Python
49 Requires:       Zope
50 Requires:       %{name} = %{version}
51 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
52
53 %description -n Zope-%{prod_name}
54 Zope PostgreSQL database adapter.
55
56 %description -n Zope-%{prod_name} -l pl
57 Interfejs bazy danych PostgreSQL do Zope.
58
59 %prep
60 %setup -q -n %{module}-%{version}
61 %patch0 -p1
62
63 %build
64 %{__autoconf}
65
66 %configure \
67         --with-python=%{_bindir}/python \
68         --with-mxdatetime-includes=%{py_incdir}/mx \
69         --with-postgres-includes=%{_includedir}/postgresql/server
70 %{__make}
71
72 cd %{prod_name}
73 %{python_compile}
74 %{python_compile_opt}
75
76 %install
77 rm -rf $RPM_BUILD_ROOT
78 install -d $RPM_BUILD_ROOT{%{py_sitedir},%{zope_productsdir}/%{prod_name}}
79
80 install psycopgmodule.so $RPM_BUILD_ROOT%{py_sitedir}
81
82 cp -ar %{prod_name}/* $RPM_BUILD_ROOT%{zope_productsdir}/%{prod_name}
83 rm -f $RPM_BUILD_ROOT%{zope_productsdir}/%{prod_name}/*.py
84
85 %clean
86 rm -rf $RPM_BUILD_ROOT
87
88 %files
89 %defattr(644,root,root,755)
90 %doc AUTHORS CREDITS FAQ NEWS README RELEASE-1.0 SUCCESS TODO doc
91 %attr(755,root,root) %{py_sitedir}/*.so
92
93 %files -n Zope-%{prod_name}
94 %defattr(644,root,root,755)
95 %{zope_productsdir}/%{prod_name}
This page took 0.113062 seconds and 4 git commands to generate.