zbyszek / rpms / PyGreSQL

Forked from rpms/PyGreSQL 6 years ago
Clone
859b4d6
%global srcname	PyGreSQL
859b4d6
5785e12
%{!?runselftest:%global runselftest 1}
5785e12
859b4d6
Name:		%{srcname}
c53bd98
Version:	5.0.4
f635a6c
Release:	2%{?dist}
f635a6c
Summary:	Python client library for PostgreSQL
a5898f6
a5898f6
Group:		Applications/Databases
a5898f6
URL:		http://www.pygresql.org/
a5898f6
# Author states his intention is to dual license under PostgreSQL or Python
a5898f6
# licenses --- this is not too clear from the current tarball documentation,
a5898f6
# but hopefully will be clearer in future releases.
Tom Lane c145e99
# The PostgreSQL license is very similar to other MIT licenses, but the OSI
Tom Lane c145e99
# recognizes it as an independent license, so we do as well.
Tom Lane c145e99
License:	PostgreSQL or Python
a5898f6
f85e72e
Source0:	http://www.pygresql.org/files/PyGreSQL-%{version}.tar.gz
a5898f6
859b4d6
BuildRequires:	postgresql-devel python2-devel python3-devel
a5898f6
e99faa2
# For testsuite
e99faa2
BuildRequires:	postgresql-server
e99faa2
b429467
%{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
a5898f6
f635a6c
%global _description\
f635a6c
PostgreSQL is an advanced Object-Relational database management system.\
f635a6c
The PyGreSQL package provides a module for developers to use when writing\
a5898f6
Python code for accessing a PostgreSQL database.
a5898f6
f635a6c
%description %_description
f635a6c
f635a6c
%package -n python2-pygresql
f635a6c
Summary: %summary
f635a6c
# PyGreSQL was originally shipped as a sub-RPM of the PostgreSQL package;
f635a6c
# these Provides/Obsoletes give a migration path.  Note there is no
f635a6c
# intention of changing the version numbers in future.
f635a6c
Provides:	postgresql-python = 8.5.0-1
f635a6c
Obsoletes:	postgresql-python < 8.5
f635a6c
Provides:	python2-%{name} = %{version}-%{release}
f635a6c
Provides:	python2-%{name}%{?_isa} = %{version}-%{release}
f635a6c
%{?python_provide:%python_provide python2-pygresql}
f635a6c
# Remove before F30
f635a6c
%{?python_provide:%python_provide python2-%{srcname}}
f635a6c
Provides: PyGreSQL = %{version}-%{release}
f635a6c
Provides: PyGreSQL%{?_isa} = %{version}-%{release}
f635a6c
Obsoletes: PyGreSQL < %{version}-%{release}
f635a6c
f635a6c
%description -n python2-pygresql %_description
859b4d6
1bb767e
%package -n python3-pygresql
f635a6c
Summary:	%summary
1bb767e
%{?python_provide:%python_provide python3-pygresql}
1bb767e
# Remove before F30
1bb767e
Provides: python3-PyGreSQL = %{version}-%{release}
1bb767e
Provides: python3-PyGreSQL%{?_isa} = %{version}-%{release}
1bb767e
Obsoletes: python3-PyGreSQL < %{version}-%{release}
859b4d6
1bb767e
%description -n python3-pygresql
859b4d6
859b4d6
a5898f6
%prep
859b4d6
%autosetup -n %{srcname}-%{version}
a5898f6
559275e
# PyGreSQL releases have execute bits on all files
559275e
find -type f -exec chmod 644 {} +
a5898f6
238846c
a5898f6
%build
859b4d6
%py2_build
859b4d6
%py3_build
a5898f6
a5898f6
238846c
%install
859b4d6
%py2_install
859b4d6
%py3_install
a5898f6
238846c
a5898f6
%clean
238846c
a5898f6
f635a6c
%files -n python2-pygresql
559275e
%license docs/copyright.rst
559275e
%doc docs/*.rst
859b4d6
%{python2_sitearch}/*.so
859b4d6
%{python2_sitearch}/*.py
859b4d6
%{python2_sitearch}/*.pyc
859b4d6
%{python2_sitearch}/*.pyo
859b4d6
%{python2_sitearch}/*.egg-info
859b4d6
859b4d6
1bb767e
%files -n python3-pygresql
859b4d6
%license docs/copyright.rst
859b4d6
%doc docs/*.rst
859b4d6
%{python3_sitearch}/*.so
859b4d6
%{python3_sitearch}/*.py
859b4d6
%{python3_sitearch}/__pycache__/*.py{c,o}
859b4d6
%{python3_sitearch}/*.egg-info
859b4d6
a5898f6
e99faa2
%check
5785e12
%if %runselftest == 0
5785e12
exit 0
5785e12
%endif
5bff6f3
5bff6f3
%pgtests_init
5bff6f3
%pgtests_start
e99faa2
e99faa2
cat > LOCAL_PyGreSQL.py <
5bff6f3
dbname = '${PGTESTS_DATABASES##*:}'
ad06ce5
# Per https://mail.vex.net/mailman/private.cgi/pygresql/2017-July/003446.html
ad06ce5
# advice to leave 'dbhost' empty.
c53bd98
dbhost = ''
5bff6f3
dbport = $PGPORT
e99faa2
EOF
e99faa2
e99faa2
%{__python2} setup.py test
e99faa2
%{__python3} setup.py test
e99faa2
e99faa2
a5898f6
%changelog
f635a6c
* Tue Jan 02 2018 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 5.0.4-2
f635a6c
- Python 2 binary package renamed to python2-pygresql
f635a6c
  See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3
1bb767e
- Python 3 binary package renamed to python3-pygresql
f635a6c
c53bd98
* Wed Aug 16 2017 Pavel Raiskup <praiskup@redhat.com> - 5.0.4-1
c53bd98
- Rebase to upstream version 5.0.4 per rhbz#1475595
c53bd98
  See changelog http://www.pygresql.org/changelog.html
c53bd98
93cc821
* Wed Aug 02 2017 Fedora Release Engineering <releng@fedoraproject.org> - 5.0.3-6
93cc821
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
93cc821
695d40b
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 5.0.3-5
695d40b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
695d40b
1b67c85
* Fri Feb 17 2017 Pavel Raiskup <praiskup@redhat.com> - 5.0.3-4
1b67c85
- fix nasty undefined behavior (rhbz#1423108)
1b67c85
1367ece
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 5.0.3-3
1367ece
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
1367ece
e5c09a8
* Mon Dec 19 2016 Miro Hrončok <mhroncok@redhat.com> - 5.0.3-2
e5c09a8
- Rebuild for Python 3.6
e5c09a8
eaa3f8c
* Mon Dec 12 2016 Pavel Raiskup <praiskup@redhat.com> - 5.0.3-1
eaa3f8c
- rhbz#1403519, rebase per upstream changelog
eaa3f8c
  http://www.pygresql.org/contents/changelog.html
eaa3f8c
5bff6f3
* Wed Oct 05 2016 Pavel Raiskup <praiskup@redhat.com> - 5.0.2-2
5bff6f3
- run tests through postgresql-setup 5.0, packaged in postgresql-devel
5bff6f3
f195756
* Wed Sep 21 2016 Petr Kubat <pkubat@redhat.com> - 5.0.2-1
f195756
- Rebase to upstream version 5.0.2 per #1376292
f195756
  See changelog http://www.pygresql.org/changelog.html
f195756
c291e47
* Mon Aug 29 2016 Petr Kubat <pkubat@redhat.com> - 5.0.1-1
c291e47
- Rebase to upstream version 5.0.1 per #1370775
c291e47
  See changelog http://www.pygresql.org/changelog.html
c291e47
123d8ca
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 5.0-4
123d8ca
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
123d8ca
45fd1e7
* Mon Mar 21 2016 Pavel Raiskup <praiskup@redhat.com> - 5.0-3
45fd1e7
- hardcode TZ=UTC
45fd1e7
a9245cb
* Mon Mar 21 2016 Pavel Raiskup <praiskup@redhat.com> - 5.0-2
a9245cb
- use %%python_provide macro according to Python packaging guidelines
5785e12
- allow disabling the testsuite by 'rpmbuild --define "runselftest 0"'
a9245cb
f85e72e
* Mon Mar 21 2016 Pavel Raiskup <praiskup@redhat.com> - 5.0-1
f85e72e
- rebase to 5.0
859b4d6
- provide python2-PyGreSQL and add python3-PyGreSQL
e99faa2
- enable testsuite
238846c
- cleanup obsoleted spec statements
f85e72e
0166e63
* Wed Feb 03 2016 Fedora Release Engineering <releng@fedoraproject.org> - 4.2-2
0166e63
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
0166e63
559275e
* Tue Jan 26 2016 Pavel Raiskup <praiskup@redhat.com> - 4.2-1
559275e
- rebase (per rhbz#1301241)
559275e
29ed3e1
* Tue Jun 16 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 4.1.1-4
29ed3e1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
29ed3e1
58a181f
* Fri Aug 15 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 4.1.1-3
58a181f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
58a181f
771d8e3
* Fri Jun 06 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 4.1.1-2
771d8e3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
771d8e3
Jozef Mlich c1d1d40
* Wed Mar 12 2014 Jozef Mlich <jmlich@redhat.com> - 4.1.1-1
Jozef Mlich c1d1d40
- Rebase to 4.1.1.
Jozef Mlich c1d1d40
  See changelog http://www.pygresql.org/changelog.html
Jozef Mlich c1d1d40
  Resolves: #1071940
Jozef Mlich c1d1d40
81a48b5
* Fri Aug 02 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 4.0-8
81a48b5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
81a48b5
8ca4177
* Wed Feb 13 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 4.0-7
8ca4177
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
8ca4177
Tom Lane 8c02676
* Sat Nov 17 2012 Tom Lane <tgl@redhat.com> 4.0-6
Tom Lane 8c02676
- Update tarball URL in specfile (no actual package change)
Tom Lane 8c02676
3836a2f
* Wed Jul 18 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 4.0-5
3836a2f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
3836a2f
2e5beb3
* Thu Jan 12 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 4.0-4
2e5beb3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
2e5beb3
Tom Lane 5856a81
* Thu Jul  7 2011 Tom Lane <tgl@redhat.com> 4.0-3
Tom Lane 5856a81
- Add upstream patch for set_decimal bug
Tom Lane 5856a81
Resolves: #719093
Tom Lane 5856a81
ca0bca6
* Mon Feb 07 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 4.0-2
ca0bca6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
ca0bca6
Tom Lane c145e99
* Wed Dec 29 2010 Tom Lane <tgl@redhat.com> 4.0-1
Tom Lane c145e99
- Update to PyGreSQL 4.0
Tom Lane c145e99
- Relabel license as PostgreSQL now that that's separately recognized by OSI.
Tom Lane c145e99
2585f3d
* Wed Jul 21 2010 David Malcolm <dmalcolm@redhat.com> - 3.8.1-3
2585f3d
- Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild
2585f3d
a5898f6
* Tue Nov 24 2009 Tom Lane <tgl@redhat.com> 3.8.1-2
a5898f6
- Fix License tag and permissions on example scripts under tutorial/,
a5898f6
  per discussion in package review request.
a5898f6
Related: #452321
a5898f6
a5898f6
* Fri Jun 20 2008 Tom Lane <tgl@redhat.com> 3.8.1-1
a5898f6
- Created package by stripping down postgresql specfile and adjusting
a5898f6
  to meet current packaging guidelines for python modules.