2 %define module PyGreSQL
3 %define python_sitepkgsdir %(echo `python -c "import sys; print (sys.prefix + '/lib/python' + sys.version[:3] + '/site-packages/')"`)
4 %define python_compile_opt python -O -c "import compileall; compileall.compile_dir('.')"
5 %define python_compile python -c "import compileall; compileall.compile_dir('.')"
7 Summary: Python interface to PostgresSQL
8 Summary(pl): Interfejs pomiêdzy jêzykiem Python a baz± danych PostgresSQL
12 Copyright: See description
13 Group: Applications/Databases/Interfaces
14 Group(de): Applikationen/Dateibanken/Schnittstellen
15 Group(pl): Aplikacje/Bazy danych/Interfejsy
16 Source0: ftp://ftp.druid.net/pub/distrib/%{module}-%{version}.tgz
17 Source1: python-Makefile.pre.in
18 Source2: Setup.in.PyGreSQL
19 URL: http://www.druid.net/pygresql
20 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
21 Requires: python >= 1.5
22 BuildRequires: python-devel >= 1.5
23 BuildRequires: postgresql-devel >= 6.5.3
26 This package provides access to PostgresSQL data from Python
28 Written by D'Arcy J.M. Cain, darcy@druid.net Based heavily on code
29 written by Pascal Andre, andre@chimay.via.ecp.fr. Copyright (c) 1995,
30 Pascal ANDRE (andre@via.ecp.fr)
32 See documentation for the full Copyright notice.
35 Ten pakiet zapewnia dostêp do baz danych PostgreSQL z poziomu skryptów
38 Autor: D'Arcy J.M. Cain, darcy@druid.net Oparte na kodzie napisanym
39 przez Pascala Andre, andre@chimay.via.ecp.fr. Copyright (c) 1995,
40 Pascal ANDRE (andre@via.ecp.fr)
42 Pe³na informacja na temat praw autorskich znajduje siê w dokumentacji.
45 %setup -q -n PyGreSQL-3.1
46 cp -f %{SOURCE1} ./Makefile.pre.in
47 cp -f %{SOURCE2} Setup.in
50 %{__make} -f Makefile.pre.in boot
51 %{__make} OPT="%{rpmcflags}"
54 rm -rf $RPM_BUILD_ROOT
55 install -d $RPM_BUILD_ROOT%{python_sitepkgsdir}/%{module}
56 echo %{module} > $RPM_BUILD_ROOT%{python_sitepkgsdir}/%{module}.pth
61 install pg.py{c,o} $RPM_BUILD_ROOT%{python_sitepkgsdir}/%{module}
62 install -m 755 _pgmodule.so $RPM_BUILD_ROOT%{python_sitepkgsdir}/%{module}
64 gzip -9nf README README.linux Announce ChangeLog
65 tar czf tutorial.tar.gz tutorial
68 rm -rf $RPM_BUILD_ROOT
71 %defattr(644,root,root,755)
72 %doc {README,README.linux,tutorial.tar,Announce,ChangeLog}.gz
73 %attr(755,root,root) %{python_sitepkgsdir}/%{module}/_pgmodule.so
74 %attr(644,root,root) %{python_sitepkgsdir}/%{module}/*.pyc
75 %attr(644,root,root) %{python_sitepkgsdir}/%{module}/*.pyo
76 %attr(644,root,root) %{python_sitepkgsdir}/%{module}.pth