840879a
# Python major version.
840879a
%{expand: %%define pyver %(python -c 'import sys;print(sys.version[0:3])')}
840879a
%{!?python_sitearch: %define python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
840879a
840879a
%define ZPsycopgDAdir %{_localstatedir}/lib/zope/Products/ZPsycopgDA
840879a
840879a
840879a
Summary:	A PostgreSQL database adapter for Python
840879a
Name:		python-psycopg2
668cfca
Version:	2.0.5.1
02f0d00
Release:	3%{?dist}
840879a
Source0:	http://initd.org/pub/software/psycopg/psycopg2-%{version}.tar.gz
840879a
License:	GPL (with Exceptions)
840879a
Group:		Applications/Databases
840879a
BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
840879a
Url:		http://www.initd.org/software/initd/psycopg
840879a
BuildRequires:	python-devel postgresql-devel
840879a
Requires:	postgresql-libs
840879a
840879a
%description
840879a
psycopg is a PostgreSQL database adapter for the Python programming
840879a
language (just like pygresql and popy.) It was written from scratch 
840879a
with the aim of being very small and fast, and stable as a rock. The 
840879a
main advantages of psycopg are that it supports the full Python
840879a
DBAPI-2.0 and being thread safe at level 2.
840879a
840879a
%package doc
840879a
Summary:	Documentation for psycopg python PostgreSQL database adapter
840879a
Group:		Documentation
840879a
Requires:	%{name} = %{version}-%{release}
840879a
840879a
%description doc
840879a
Documentation and example files for the psycopg python PostgreSQL
840879a
database adapter.
840879a
840879a
%package zope
840879a
Summary:	Zope Database Adapter ZPsycopgDA
840879a
Group:		Applications/Databases
840879a
Requires:	%{name} = %{version}-%{release} zope
840879a
840879a
%description zope
840879a
Zope Database Adapter for PostgreSQL, called ZPsycopgDA
840879a
840879a
%prep
840879a
%setup -q -n psycopg2-%{version}
840879a
840879a
%build
840879a
python setup.py build
840879a
# Fix for wrong-file-end-of-line-encoding problem; upstream also must fix this.
840879a
for i in `find doc -iname "*.html"`; do sed -i 's/\r//' $i; done
840879a
for i in `find doc -iname "*.css"`; do sed -i 's/\r//' $i; done
840879a
840879a
%install
840879a
rm -Rf %{buildroot}
840879a
mkdir -p %{buildroot}%{python_sitearch}/psycopg2
840879a
python setup.py install --no-compile --root %{buildroot}
840879a
840879a
install -d %{buildroot}%{ZPsycopgDAdir}
840879a
cp -pr ZPsycopgDA/* %{buildroot}%{ZPsycopgDAdir}
840879a
840879a
%clean
840879a
rm -rf %{buildroot}
840879a
840879a
%files
840879a
%defattr(-,root,root)
840879a
%doc AUTHORS ChangeLog INSTALL LICENSE MANIFEST README
840879a
%dir %{python_sitearch}/psycopg2
840879a
%{python_sitearch}/psycopg2/*.py
840879a
%{python_sitearch}/psycopg2/*.pyc
840879a
%{python_sitearch}/psycopg2/*.so
02f0d00
%{python_sitearch}/psycopg2/*.pyo
840879a
840879a
%files doc
840879a
%defattr(-,root,root)
840879a
%doc doc examples/
840879a
840879a
%files zope
840879a
%defattr(-,root,root)
840879a
%dir %{ZPsycopgDAdir}
840879a
%{ZPsycopgDAdir}/*.py
02f0d00
%{ZPsycopgDAdir}/*.pyo
840879a
%{ZPsycopgDAdir}/*.pyc
840879a
%{ZPsycopgDAdir}/dtml/*
840879a
%{ZPsycopgDAdir}/icons/*
840879a
840879a
%changelog
565bdc0
* Wed Dec 6 2006 - Devrim GUNDUZ <devrim@commandprompt.com> 2.0.5.1-4
565bdc0
- Rebuilt for PostgreSQL 8.2.0
565bdc0
02f0d00
* Mon Sep 11 2006 - Devrim GUNDUZ <devrim@commandprompt.com> 2.0.5.1-3
02f0d00
- Rebuilt
02f0d00
02f0d00
* Wed Sep 6 2006 - Devrim GUNDUZ <devrim@commandprompt.com> 2.0.5.1-2
02f0d00
- Remove ghost'ing, per Python Packaging Guidelines
02f0d00
668cfca
* Mon Sep 4 2006 - Devrim GUNDUZ <devrim@commandprompt.com> 2.0.5.1-1
668cfca
- Update to 2.0.5.1
668cfca
840879a
* Sun Aug 6 2006 - Devrim GUNDUZ <devrim@commandprompt.com> 2.0.3-3
840879a
- Fixed zope package dependencies and macro definition, per bugzilla review (#199784)
840879a
- Fixed zope package directory ownership, per bugzilla review (#199784)
840879a
- Fixed cp usage for zope subpackage, per bugzilla review (#199784)
840879a
840879a
* Mon Jul 31 2006 - Devrim GUNDUZ <devrim@commandprompt.com> 2.0.3-2
840879a
- Fixed 64 bit builds
840879a
- Fixed license
840879a
- Added Zope subpackage
840879a
- Fixed typo in doc description
840879a
- Added macro for zope subpackage dir
840879a
840879a
* Mon Jul 31 2006 - Devrim GUNDUZ <devrim@commandprompt.com> 2.0.3-1
840879a
- Update to 2.0.3
840879a
- Fixed spec file, per bugzilla review (#199784)
840879a
840879a
* Sat Jul 22 2006 - Devrim GUNDUZ <devrim@commandprompt.com> 2.0.2-3
840879a
- Removed python dependency, per bugzilla review. (#199784)
840879a
- Changed doc package group, per bugzilla review. (#199784)
840879a
- Replaced dos2unix with sed, per guidelines and bugzilla review (#199784)
840879a
- Fix changelog dates
840879a
840879a
* Sat Jul 21 2006 - Devrim GUNDUZ <devrim@commandprompt.com> 2.0.2-2
840879a
- Added dos2unix to buildrequires
840879a
- removed python related part from package name
840879a
840879a
* Fri Jul 20 2006 - Devrim GUNDUZ <devrim@commandprompt.com> 2.0.2-1
840879a
- Fix rpmlint errors, including dos2unix solution
840879a
- Re-engineered spec file
840879a
840879a
* Fri Jan 23 2006 - Devrim GUNDUZ <devrim@commandprompt.com>
840879a
- First 2.0.X build
840879a
840879a
* Fri Jan 23 2006 - Devrim GUNDUZ <devrim@commandprompt.com>
840879a
- Update to 1.2.21
840879a
840879a
* Tue Dec 06 2005 - Devrim GUNDUZ <devrim@commandprompt.com>
840879a
- Initial release for 1.1.20