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
539ba86
# Python 2.5+ is not supported by Zope, so it does not exist in
539ba86
# recent Fedora releases. That's why zope subpackage is disabled.
6c1f416
#%define ZPsycopgDAdir %{_localstatedir}/lib/zope/Products/ZPsycopgDA
840879a
840879a
840879a
Summary:	A PostgreSQL database adapter for Python
840879a
Name:		python-psycopg2
481c0ca
Version:	2.2.2
5f0abee
Release:	1%{?dist}
840879a
Source0:	http://initd.org/pub/software/psycopg/psycopg2-%{version}.tar.gz
6ad371e
# The exceptions allow linking to OpenSSL and PostgreSQL's libpq
5f0abee
License:	LGPL3
840879a
Group:		Applications/Databases
840879a
BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
840879a
Url:		http://www.initd.org/software/initd/psycopg
2ad0900
840879a
BuildRequires:	python-devel postgresql-devel
840879a
2ad0900
Conflicts:	python-psycopg2-zope < %{version}
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
a08f87b
This is the first release of the new 2.2 series, supporting not just
a08f87b
one but two different ways of executing asynchronous queries, thanks to
a08f87b
Jan and Daniele (with a little help from me and others, but they did
a08f87b
99% of the work so they deserve their names here in the news.)
a08f87b
a08f87b
psycopg now supports both classic select() loops and "green" coroutine
a08f87b
libraries. It is all in the documentation, so just point your browser to
a08f87b
doc/html/advanced.html.
a08f87b
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
6ad371e
# The exceptions allow linking to OpenSSL and PostgreSQL's libpq
6ad371e
#License:	GPLv2+ with exceptions or ZPLv1.0
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)
db70d45
%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
481c0ca
* Tue Jul 208 2010 Devrim GUNDUZ <devrim@gunduz.org> - 2.2.2-1
481c0ca
- Update to 2.2.2
481c0ca
a08f87b
* Tue May 18 2010 Devrim GUNDUZ <devrim@gunduz.org> - 2.2.1-1
a08f87b
- Update to 2.2.1
a08f87b
- Improve description for 2.2 features.
a08f87b
- Changelog for 2.2.0 is: 
a08f87b
   http://initd.org/pub/software/psycopg/ChangeLog-2.2
a08f87b
5f0abee
* Wed Mar 17 2010 Devrim GUNDUZ <devrim@gunduz.org> - 2.0.14-1
5f0abee
- Update to 2.0.14
5f0abee
- Update license (upstream switched to LGPL3)
5f0abee
2ad0900
* Sun Jan 24 2010 Tom Lane <tgl@redhat.com> 2.0.13-2
2ad0900
- Fix rpmlint complaints: remove unneeded explicit Requires:, use Conflicts:
2ad0900
  instead of bogus Obsoletes: to indicate lack of zope subpackage
2ad0900
5ca9a9e
* Sun Oct 18 2009 Devrim GUNDUZ <devrim@gunduz.org> - 2.0.13-1
5ca9a9e
- Update to 2.0.13
5ca9a9e
eb32e78
* Fri Aug 14 2009 Devrim GUNDUZ <devrim@gunduz.org> - 2.0.12-1
eb32e78
- Update to 2.0.12
eb32e78
bf3232d
* Sun Jul 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.0.11-2
bf3232d
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
bf3232d
783bb1f
* Tue May 19 2009 Devrim GUNDUZ <devrim@gunduz.org> - 2.0.11-1
783bb1f
- Update to 2.0.11
783bb1f
9269647
* Tue Apr 21 2009 Devrim GUNDUZ <devrim@gunduz.org> - 2.0.10-1
9269647
- Update to 2.0.10
9269647
df276bd
* Fri Mar 20 2009 Devrim GUNDUZ <devrim@gunduz.org> - 2.0.9-1
5effe45
- Update to 2.0.9
5effe45
c7e629e
* Thu Feb 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.0.8-3
c7e629e
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
c7e629e
a298da8
* Thu Dec 04 2008 Ignacio Vazquez-Abrams <ivazqueznet+rpm@gmail.com> - 2.0.8-2
a298da8
- Rebuild for Python 2.6
a298da8
5a9138c
* Sat Nov 29 2008 Devrim GUNDUZ <devrim@gunduz.org> - 2.0.8-1
5a9138c
- Update to 2.0.8
5a9138c
5effe45
* Sat Nov 29 2008 Devrim GUNDUZ <devrim@gunduz.org> - 2.0.8-1
5effe45
- Update to 2.0.8
5effe45
293a506
* Sat Nov 29 2008 Ignacio Vazquez-Abrams <ivazqueznet+rpm@gmail.com> - 2.0.7-3
293a506
- Rebuild for Python 2.6
293a506
6ad371e
* Thu May 29 2008 Todd Zullinger <tmz@pobox.com> - 2.0.7-2
6ad371e
- fix license tags
6ad371e
c357de4
* Wed Apr 30 2008 Devrim GUNDUZ <devrim@commandprompt.com> 2.0.7-1
c357de4
- Update to 2.0.7
c357de4
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