%global pypi pg8000
Name: python-%{pypi}
Version: 1.10.5
Release: 1%{?dist}
Summary: Pure Python PostgreSQL Driver
License: BSD
URL: http://pythonhosted.org/pg8000/
Source0: https://pypi.python.org/packages/source/p/pg8000/pg8000-%{version}.tar.gz
BuildArch: noarch
%description
pg8000 is a pure-Python PostgreSQL driver that complies with DB-API 2.0.
The driver communicates with the database using the PostgreSQL Backend /
Frontend Protocol.
%package -n python2-%{pypi}
Summary: Pure Python2 PostgreSQL Driver
BuildRequires: python2-devel
BuildRequires: python-six
BuildRequires: python-setuptools
Requires: python-six
%{?fedora:Suggests: python2-sqlalchemy}
%{?fedora:Suggests: postgresql}
%{?python_provide:%python_provide python2-%{pypi}}
%description -n python2-%{pypi}
pg8000 is a pure Python2 PostgreSQL driver that complies with DB-API 2.0.
The driver communicates with the database using the PostgreSQL Backend /
Frontend Protocol.
%package -n python%{python3_pkgversion}-%{pypi}
Summary: Pure Python3 PostgreSQL Driver
BuildRequires: python%{python3_pkgversion}-devel
BuildRequires: python%{python3_pkgversion}-six
BuildRequires: python%{python3_pkgversion}-setuptools
Requires: python%{python3_pkgversion}-six
%{?fedora:Suggests: python3-sqlalchemy}
%{?fedora:Suggests: postgresql}
%{?python_provide:%python_provide python%{python3_pkgversion}-%{pypi}}
%description -n python%{python3_pkgversion}-%{pypi}
pg8000 is a pure Python3 PostgreSQL driver that complies with DB-API 2.0.
The driver communicates with the database using the PostgreSQL Backend /
Frontend Protocol.
%if 0%{?fedora}
%package docs
Summary: HTML documentation for %{name}
BuildRequires: python-sphinx
%description docs
HTML documentation for pg8000, a pure Python2 and Python3 PostgreSQL
driver that complies with DB-API 2.0.
%endif
%prep
%autosetup -n %{pypi}-%{version}
%build
%py2_build
%py3_build
%install
%py2_install
%py3_install
%if 0%{?fedora}
%{__python2} setup.py build_sphinx
rm -rf build/sphinx/html/.buildinfo
rm -rf build/sphinx/html/_static/__tmp__.txt
%endif
%check
#Test requires a runing PostgreSQL instance
%files -n python2-%{pypi}
%license LICENSE
%doc README.creole
%{python2_sitelib}/*
%files -n python%{python3_pkgversion}-%{pypi}
%license LICENSE
%doc README.creole
%{python3_sitelib}/*
%if 0%{?fedora}
%files docs
%license LICENSE
%doc build/sphinx/html/*
%endif
%changelog
* Fri Mar 11 2016 William Moreno <williamjmorenor@gmail.com> - 1.10.5-1
- Update to 1.10.5
- Remove patch included in upstream release
- Build docs in Fedora builds
- Update Source0 link
* Wed Mar 02 2016 William Moreno <williamjmorenor@gmail.com> - 1.10.4-1
- Epel7 packaging of version 1.10.4
* Tue Mar 01 2016 William Moreno <williamjmorenor@gmail.com> - 1.10.4-1
- Update to 1.10.4
- Remove patch1 included in upstream release
- Change source name
- Remove doc subpackage, upstream remove source in this release
- Patch licence text not include in the release
* Mon Feb 08 2016 William Moreno <williamjmorenor at gmail.com> - 1.10.3-2
- Remove bundled six library.
* Wed Feb 03 2016 William Moreno <williamjmorenor at gmail.com> - 1.10.3-1
- Initial Packaging