]> git.pld-linux.org Git - packages/python-psycopg.git/blob - python-psycopg.spec
31e97fc7c4124c6f7f3b32e0610d65fdd79821d4
[packages/python-psycopg.git] / python-psycopg.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 BuildArch:      noarch
52 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
53
54 %description -n Zope-%{prod_name}
55 Zope PostgreSQL database adapter.
56
57 %description -n Zope-%{prod_name} -l pl
58 Interfejs bazy danych PostgreSQL do Zope.
59
60 %prep
61 %setup -q -n %{module}-%{version}
62 %patch0 -p1
63
64 %build
65 %{__autoconf}
66
67 %configure \
68         --with-python=%{_bindir}/python \
69         --with-mxdatetime-includes=%{py_incdir}/mx \
70         --with-postgres-includes=%{_includedir}/postgresql/server
71 %{__make}
72
73 cd %{prod_name}
74 %{python_compile}
75 %{python_compile_opt}
76 cd ..
77
78 %install
79 rm -rf $RPM_BUILD_ROOT
80 install -d $RPM_BUILD_ROOT{%{py_sitedir},%{zope_productsdir}/%{prod_name}}
81
82 install psycopgmodule.so $RPM_BUILD_ROOT%{py_sitedir}
83
84 cp -ar %{prod_name}/* $RPM_BUILD_ROOT%{zope_productsdir}/%{prod_name}
85 rm -f $RPM_BUILD_ROOT%{zope_productsdir}/%{prod_name}/*.py
86
87 %clean
88 rm -rf $RPM_BUILD_ROOT
89
90 %files
91 %defattr(644,root,root,755)
92 %doc AUTHORS CREDITS FAQ NEWS README RELEASE-1.0 SUCCESS TODO doc
93 %attr(755,root,root) %{py_sitedir}/*.so
94
95 %files -n Zope-%{prod_name}
96 %defattr(644,root,root,755)
97 %{zope_productsdir}/%{prod_name}
This page took 0.093408 seconds and 3 git commands to generate.