]> git.pld-linux.org Git - packages/python-psycopg2.git/blob - python-psycopg2.spec
d4bff40b5bafbac19dc0f7969df8636f9e362bec
[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:        1
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:  postgresql-backend-devel
17 BuildRequires:  python-devel
18 BuildRequires:  python-mx-DateTime-devel
19 Requires:       postgresql-libs
20 %pyrequires_eq  python-modules
21 Requires:       python-mx-DateTime
22 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
23
24 %define prod_name ZPsycopgDA
25 %define zope_dir           %{_libdir}/zope
26 %define zope_productsdir   %{zope_dir}/Products
27 %define python_compile_opt python -O -c "import compileall; compileall.compile_dir('.')"
28 %define python_compile     python -c "import compileall; compileall.compile_dir('.')"
29
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 cd ..
76
77 %install
78 rm -rf $RPM_BUILD_ROOT
79 install -d $RPM_BUILD_ROOT{%{py_sitedir},%{zope_productsdir}/%{prod_name}}
80
81 install psycopgmodule.so $RPM_BUILD_ROOT%{py_sitedir}
82
83 cp -ar %{prod_name}/* $RPM_BUILD_ROOT%{zope_productsdir}/%{prod_name}
84 rm -f $RPM_BUILD_ROOT%{zope_productsdir}/%{prod_name}/*.py
85
86 %clean
87 rm -rf $RPM_BUILD_ROOT
88
89 %files
90 %defattr(644,root,root,755)
91 %doc AUTHORS CREDITS FAQ NEWS README RELEASE-1.0 SUCCESS TODO doc
92 %attr(755,root,root) %{py_sitedir}/*.so
93
94 %files -n Zope-%{prod_name}
95 %defattr(644,root,root,755)
96 %{zope_productsdir}/%{prod_name}
This page took 0.112269 seconds and 2 git commands to generate.