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
6c1f416
#%define ZPsycopgDAdir %{_localstatedir}/lib/zope/Products/ZPsycopgDA
840879a
840879a
840879a
Summary:	A PostgreSQL database adapter for Python
840879a
Name:		python-psycopg2
7f93226
Version:	2.0.11
6cf0f28
Release:	1%{?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
6c1f416
Obsoletes:	python-psycopg2-zope <= 2.0.5.1-8
6c1f416
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
6c1f416
#%package zope
6c1f416
#Summary:	Zope Database Adapter ZPsycopgDA
6c1f416
#Group:		Applications/Databases
6c1f416
#Requires:	%{name} = %{version}-%{release} zope
840879a
6c1f416
#%description zope
6c1f416
#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
6c1f416
#install -d %{buildroot}%{ZPsycopgDAdir}
6c1f416
#cp -pr ZPsycopgDA/* %{buildroot}%{ZPsycopgDAdir}
840879a
840879a
%clean
840879a
rm -rf %{buildroot}
840879a
840879a
%files
840879a
%defattr(-,root,root)
9b69e82
%doc AUTHORS ChangeLog INSTALL LICENSE 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
bf4907f
%{python_sitearch}/psycopg2-%{version}-py%{pyver}.egg-info
840879a
840879a
%files doc
840879a
%defattr(-,root,root)
840879a
%doc doc examples/
840879a
6c1f416
#%files zope
6c1f416
#%defattr(-,root,root)
6c1f416
#%dir %{ZPsycopgDAdir}
6c1f416
#%{ZPsycopgDAdir}/*.py
6c1f416
#%{ZPsycopgDAdir}/*.pyo
6c1f416
#%{ZPsycopgDAdir}/*.pyc
6c1f416
#%{ZPsycopgDAdir}/dtml/*
6c1f416
#%{ZPsycopgDAdir}/icons/*
840879a
840879a
%changelog
7f93226
* Tue May 19 2009 Devrim GUNDUZ <devrim@gunduz.org> - 2.0.11-1
7f93226
- Update to 2.0.11
7f93226
d7c07bc
* Tue Apr 21 2009 Devrim GUNDUZ <devrim@gunduz.org> - 2.0.10-1
d7c07bc
- Update to 2.0.10
d7c07bc
9770b57
* Fri Mar 20 2009 Devrim GUNDUZ <devrim@gunduz.org> - 2.0.9-1
9770b57
- Update to 2.0.9
9770b57
3d2122d
* Sat Nov 29 2008 Devrim GUNDUZ <devrim@gunduz.org> 2.0.8-1
3d2122d
- Update to 2.0.8
3d2122d
6cf0f28
* Wed Apr 30 2008 Devrim GUNDUZ <devrim@commandprompt.com> 2.0.7-1
6cf0f28
- Update to 2.0.7
6cf0f28
4bd375a
* Mon Feb 18 2008 Fedora Release Engineering <rel-eng@fedoraproject.org> - 2.0.6-4.1
4bd375a
- Autorebuild for GCC 4.3
4bd375a
4b261e8
* Mon Jan 21 2008 - Devrim GUNDUZ <devrim@commandprompt.com> 2.0.6-3.1
4b261e8
- Rebuilt against PostgreSQL 8.3
4b261e8
bf4907f
* Thu Jan 3 2008 - Devrim GUNDUZ <devrim@commandprompt.com> 2.0.6-3
bf4907f
- Rebuild for rawhide changes
bf4907f
ff23cf2
* Tue Aug 28 2007 Fedora Release Engineering <rel-eng at fedoraproject dot org> - 2.0.6-2
ff23cf2
- Rebuild for selinux ppc32 issue.
ff23cf2
7f15d23
* Fri Jun 15 2007 - Devrim GUNDUZ <devrim@commandprompt.com> 2.0.6-1
7f15d23
- Update to 2.0.6
7f15d23
6c1f416
* Thu Apr 26 2007 - Devrim GUNDUZ <devrim@commandprompt.com> 2.0.5.1-8
6c1f416
- Disabled zope package temporarily.
6c1f416
4464094
* Wed Dec 6 2006 - Devrim GUNDUZ <devrim@commandprompt.com> 2.0.5.1-7
3093ec4
- Rebuilt
3093ec4
7b34a82
* Wed Dec 6 2006 - Devrim GUNDUZ <devrim@commandprompt.com> 2.0.5.1-5
7b34a82
- Bumped up spec version
7b34a82
898aa0e
* Wed Dec 6 2006 - Devrim GUNDUZ <devrim@commandprompt.com> 2.0.5.1-4
898aa0e
- Rebuilt for PostgreSQL 8.2.0
898aa0e
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