Compare commits

..

No commits in common. "c8-beta-stream-3.8" and "c8-stream-2.7" have entirely different histories.

3 changed files with 94 additions and 166 deletions

2
.gitignore vendored
View File

@ -1 +1 @@
SOURCES/psycopg2-2.8.4.tar.gz SOURCES/psycopg2-2.7.5.tar.gz

View File

@ -1 +1 @@
88d3c77951377b1686749bb252b05d4982145bb0 SOURCES/psycopg2-2.8.4.tar.gz 4f77e3efcf9a0970be5120352274315f7bd1c754 SOURCES/psycopg2-2.7.5.tar.gz

View File

@ -1,28 +1,14 @@
%bcond_with python36_module
%if 0%{?fedora} %if 0%{?fedora}
%bcond_without python3 %bcond_without python2
%bcond_without python3_debug %bcond_without python3
%if 0%{?fedora} > 31
%bcond_with python2
%bcond_with python2_debug
%else
%bcond_without python2
%bcond_without python2_debug
%endif
%else %else
%if 0%{?rhel} > 7 %bcond_with python2
%bcond_with python2 %bcond_without python3
%bcond_without python3
%bcond_with python2_debug
%bcond_with python3_debug
%else
%bcond_without python2
%bcond_with python3
%bcond_without python2_debug
%bcond_with python3_debug
%endif
%endif %endif
%bcond_with tests %bcond_without check
%global srcname psycopg2 %global srcname psycopg2
%global sum A PostgreSQL database adapter for Python %global sum A PostgreSQL database adapter for Python
@ -31,13 +17,10 @@ programming language. At its core it fully implements the Python DB \
API 2.0 specifications. Several extensions allow access to many of the \ API 2.0 specifications. Several extensions allow access to many of the \
features offered by PostgreSQL. features offered by PostgreSQL.
%global python_runtimes \\\ %global python_runtimes %{?with_python2:python2 python2-debug} \\\
%{?with_python2:python2} \\\ %{?with_python3:python3.6 python3.6-debug}
%{?with_python2_debug:python2-debug} \\\
%{?with_python3:python%{python3_version}} \\\
%{?with_python3_debug:python%{python3_version}d}
%{!?with_python2:%{!?with_python3:%{error:one python version needed}}} %{!?with_python2:%{!?with_python3:%{error:one python version eneeded}}}
# Python 2.5+ is not supported by Zope, so it does not exist in # Python 2.5+ is not supported by Zope, so it does not exist in
# recent Fedora releases. That's why zope subpackage is disabled. # recent Fedora releases. That's why zope subpackage is disabled.
@ -49,29 +32,28 @@ features offered by PostgreSQL.
Summary: %{sum} Summary: %{sum}
Name: python-%{srcname} Name: python-%{srcname}
Version: 2.8.4 Version: 2.7.5
Release: 4%{?dist} Release: 7%{?dist}
# The exceptions allow linking to OpenSSL and PostgreSQL's libpq # The exceptions allow linking to OpenSSL and PostgreSQL's libpq
License: LGPLv3+ with exceptions License: LGPLv3+ with exceptions
Url: http://initd.org/psycopg/ Group: Applications/Databases
Url: http://www.psycopg.org/psycopg/
Source0: http://initd.org/psycopg/tarballs/PSYCOPG-2-8/psycopg2-%{version}.tar.gz Source0: http://www.psycopg.org/psycopg/tarballs/PSYCOPG-2-7/psycopg2-%{version}.tar.gz
# Exclude i686 arch. Due to a modularity issue it's being added to the %{?with_python2:BuildRequires: python2-debug python2-devel}
# x86_64 compose of CRB, but we don't want to ship it at all. %if %{with python36_module}
# See: https://projects.engineering.redhat.com/browse/RCM-72605 %{?with_python3:BuildRequires: python36-debug python36-devel}
ExcludeArch: i686 %{?with_python3:BuildRequires: python36-rpm-macros}
%else
%{?with_python3:BuildRequires: python3-debug python3-devel}
%endif
%{?with_python2:BuildRequires: python2-devel python2-setuptools} BuildRequires: gcc
%{?with_python3:BuildRequires: python%{python3_pkgversion}-devel python%{python3_pkgversion}-setuptools python%{python3_pkgversion}-rpm-macros} BuildRequires: pkgconfig(libpq)
%{?with_python2_debug:BuildRequires: python2-debug}
%{?with_python3_debug:BuildRequires: python%{python3_pkgversion}-debug}
BuildRequires: gcc
BuildRequires: pkgconfig(libpq)
# For testsuite # For testsuite
%if %{with tests} %if %{with check}
BuildRequires: postgresql-test-rpm-macros BuildRequires: postgresql-test-rpm-macros
%endif %endif
@ -81,7 +63,6 @@ Conflicts: python-psycopg2-zope < %{version}
%{desc} %{desc}
%if %{with python2}
%package -n python2-%{srcname} %package -n python2-%{srcname}
%{?python_provide:%python_provide python2-%{srcname}} %{?python_provide:%python_provide python2-%{srcname}}
Summary: %{sum} 2 Summary: %{sum} 2
@ -97,10 +78,8 @@ Requires: python2-%srcname = %version-%release
%description -n python2-%{srcname}-tests %description -n python2-%{srcname}-tests
%desc %desc
This sub-package delivers set of tests for the adapter. This sub-package delivers set of tests for the adapter.
%endif
%if %{with python2_debug}
%package -n python2-%{srcname}-debug %package -n python2-%{srcname}-debug
Summary: A PostgreSQL database adapter for Python 2 (debug build) Summary: A PostgreSQL database adapter for Python 2 (debug build)
# Require the base package, as we're sharing .py/.pyc files: # Require the base package, as we're sharing .py/.pyc files:
@ -110,44 +89,44 @@ Requires: python2-%{srcname} = %{version}-%{release}
%description -n python2-%{srcname}-debug %description -n python2-%{srcname}-debug
This is a build of the psycopg PostgreSQL database adapter for the debug This is a build of the psycopg PostgreSQL database adapter for the debug
build of Python 2. build of Python 2.
%endif
%if %{with python3} %if %{with python3}
%package -n python%{python3_pkgversion}-psycopg2 %package -n python3-psycopg2
Summary: %{sum} 3 Summary: %{sum} 3
%{?python_provide:%python_provide python%{python3_pkgversion}-%{srcname}} %{?python_provide:%python_provide python3-%{srcname}}
%description -n python%{python3_pkgversion}-psycopg2 %description -n python3-psycopg2
%{desc} %{desc}
%package -n python%{python3_pkgversion}-%{srcname}-tests %package -n python3-%{srcname}-tests
Summary: A testsuite for %sum 2 Summary: A testsuite for %sum 2
Requires: python%{python3_pkgversion}-%srcname = %version-%release Requires: python3-%srcname = %version-%release
%description -n python%{python3_pkgversion}-%{srcname}-tests %description -n python3-%{srcname}-tests
%desc %desc
This sub-package delivers set of tests for the adapter. This sub-package delivers set of tests for the adapter.
%endif
%if %{with python3_debug} %package -n python3-psycopg2-debug
%package -n python%{python3_pkgversion}-psycopg2-debug
Summary: A PostgreSQL database adapter for Python 3 (debug build) Summary: A PostgreSQL database adapter for Python 3 (debug build)
# Require base python 3 package, as we're sharing .py/.pyc files: # Require base python 3 package, as we're sharing .py/.pyc files:
Requires: python%{python3_pkgversion}-psycopg2 = %{version}-%{release} Requires: python3-psycopg2 = %{version}-%{release}
%description -n python%{python3_pkgversion}-%{srcname}-debug %description -n python3-%{srcname}-debug
This is a build of the psycopg PostgreSQL database adapter for the debug This is a build of the psycopg PostgreSQL database adapter for the debug
build of Python 3. build of Python 3.
%endif %endif # python3
%package -n python%{python3_pkgversion}-psycopg2-doc %package doc
Summary: Documentation for psycopg python PostgreSQL database adapter Summary: Documentation for psycopg python PostgreSQL database adapter
Group: Documentation
%{?with_python2:Provides: python2-%{srcname}-doc = %{version}-%{release}}
%{?with_python3:Provides: python3-%{srcname}-doc = %{version}-%{release}}
%description -n python%{python3_pkgversion}-psycopg2-doc %description doc
Documentation and example files for the psycopg python PostgreSQL Documentation and example files for the psycopg python PostgreSQL
database adapter. database adapter.
@ -157,6 +136,7 @@ database adapter.
Summary: Zope Database Adapter ZPsycopgDA Summary: Zope Database Adapter ZPsycopgDA
# The exceptions allow linking to OpenSSL and PostgreSQL's libpq # The exceptions allow linking to OpenSSL and PostgreSQL's libpq
License: GPLv2+ with exceptions or ZPLv1.0 License: GPLv2+ with exceptions or ZPLv1.0
Group: Applications/Databases
Requires: %{name} = %{version}-%{release} Requires: %{name} = %{version}-%{release}
Requires: zope Requires: zope
@ -170,7 +150,6 @@ Zope Database Adapter for PostgreSQL, called ZPsycopgDA
%build %build
export CFLAGS=${RPM_OPT_FLAGS} LDFLAGS=${RPM_LD_FLAGS}
for python in %{python_runtimes} ; do for python in %{python_runtimes} ; do
$python setup.py build $python setup.py build
done done
@ -180,7 +159,7 @@ for i in `find doc -iname "*.html"`; do sed -i 's/\r//' $i; done
for i in `find doc -iname "*.css"`; do sed -i 's/\r//' $i; done for i in `find doc -iname "*.css"`; do sed -i 's/\r//' $i; done
# Get rid of a "hidden" file that rpmlint complains about # Get rid of a "hidden" file that rpmlint complains about
%{__rm} -f doc/html/.buildinfo rm -f doc/html/.buildinfo
# We can not build docs now: # We can not build docs now:
# https://www.postgresql.org/message-id/2741387.dvL6Cb0VMB@nb.usersys.redhat.com # https://www.postgresql.org/message-id/2741387.dvL6Cb0VMB@nb.usersys.redhat.com
@ -188,7 +167,7 @@ for i in `find doc -iname "*.css"`; do sed -i 's/\r//' $i; done
%check %check
%if %{with tests} %if %{with check}
export PGTESTS_LOCALE=C.UTF-8 export PGTESTS_LOCALE=C.UTF-8
%postgresql_tests_run %postgresql_tests_run
@ -196,7 +175,7 @@ export PSYCOPG2_TESTDB=${PGTESTS_DATABASES##*:}
export PSYCOPG2_TESTDB_HOST=$PGHOST export PSYCOPG2_TESTDB_HOST=$PGHOST
export PSYCOPG2_TESTDB_PORT=$PGPORT export PSYCOPG2_TESTDB_PORT=$PGPORT
cmd="import tests; tests.unittest.main(defaultTest='tests.test_suite')" cmd="from psycopg2 import tests; tests.unittest.main(defaultTest='tests.test_suite')"
%if %{with python2} %if %{with python2}
PYTHONPATH=%buildroot%python2_sitearch %__python2 -c "$cmd" --verbose PYTHONPATH=%buildroot%python2_sitearch %__python2 -c "$cmd" --verbose
@ -204,32 +183,17 @@ PYTHONPATH=%buildroot%python2_sitearch %__python2 -c "$cmd" --verbose
%if %{with python3} %if %{with python3}
PYTHONPATH=%buildroot%python3_sitearch %__python3 -c "$cmd" --verbose PYTHONPATH=%buildroot%python3_sitearch %__python3 -c "$cmd" --verbose
%endif %endif
%endif %endif # check
%install %install
export CFLAGS=${RPM_OPT_FLAGS} LDFLAGS=${RPM_LD_FLAGS}
for python in %{python_runtimes} ; do for python in %{python_runtimes} ; do
$python setup.py install --no-compile --root %{buildroot} $python setup.py install --no-compile --root %{buildroot}
done done
# Upstream removed tests from the package so we need to add them manually
%if %{with python2}
cp -r tests/ %{buildroot}%{python2_sitearch}/%{srcname}/tests/
for i in `find %{buildroot}%{python2_sitearch}/%{srcname}/tests/ -iname "*.py"`; do
sed -i 's|#!/usr/bin/env python|#!/usr/bin/python2|' $i
done
%endif
%if %{with python3}
cp -r tests/ %{buildroot}%{python3_sitearch}/%{srcname}/tests/
for i in `find %{buildroot}%{python3_sitearch}/%{srcname}/tests/ -iname "*.py"`; do
sed -i 's|#!/usr/bin/env python|#!%{__python3}|' $i
done
%endif
%if %zope %if %zope
%{__install} -d %{buildroot}%{ZPsycopgDAdir} install -d %{buildroot}%{ZPsycopgDAdir}
%{__cp} -pr ZPsycopgDA/* %{buildroot}%{ZPsycopgDAdir} cp -pr ZPsycopgDA/* %{buildroot}%{ZPsycopgDAdir}
%endif %endif
# This test is skipped on 3.7 and has a syntax error so brp-python-bytecompile would choke on it # This test is skipped on 3.7 and has a syntax error so brp-python-bytecompile would choke on it
@ -249,43 +213,39 @@ done
%files -n python2-%{srcname}-tests %files -n python2-%{srcname}-tests
%{python2_sitearch}/psycopg2/tests %{python2_sitearch}/psycopg2/tests
%endif
%if %{with python2_debug}
%files -n python2-%{srcname}-debug %files -n python2-%{srcname}-debug
%license LICENSE %license LICENSE
%{python2_sitearch}/psycopg2/_psycopg_d.so %{python2_sitearch}/psycopg2/_psycopg_d.so
%endif %endif # python2
%if %{with python3} %if %{with python3}
%files -n python%{python3_pkgversion}-psycopg2 %files -n python3-psycopg2
%license LICENSE %license LICENSE
%doc AUTHORS NEWS README.rst %doc AUTHORS NEWS README.rst
%dir %{python3_sitearch}/psycopg2 %dir %{python3_sitearch}/psycopg2
%{python3_sitearch}/psycopg2/*.py %{python3_sitearch}/psycopg2/*.py
%{python3_sitearch}/psycopg2/_psycopg.cpython-3?[!d]*.so %{python3_sitearch}/psycopg2/_psycopg.cpython-3?m*.so
%dir %{python3_sitearch}/psycopg2/__pycache__ %dir %{python3_sitearch}/psycopg2/__pycache__
%{python3_sitearch}/psycopg2/__pycache__/*.py{c,o} %{python3_sitearch}/psycopg2/__pycache__/*.py{c,o}
%{python3_sitearch}/psycopg2-%{version}-py3*.egg-info %{python3_sitearch}/psycopg2-%{version}-py3*.egg-info
%files -n python%{python3_pkgversion}-%{srcname}-tests %files -n python3-%{srcname}-tests
%{python3_sitearch}/psycopg2/tests %{python3_sitearch}/psycopg2/tests
%endif
%if %{with python3_debug} %files -n python3-psycopg2-debug
%files -n python%{python3_pkgversion}-psycopg2-debug
%license LICENSE %license LICENSE
%{python3_sitearch}/psycopg2/_psycopg.cpython-3?d*.so %{python3_sitearch}/psycopg2/_psycopg.cpython-3?dm*.so
%endif %endif # python3
%files -n python%{python3_pkgversion}-psycopg2-doc %files doc
%license LICENSE %license LICENSE
%doc doc %doc doc examples/
%if %zope %if %zope
@ -301,79 +261,47 @@ done
%changelog %changelog
* Fri Dec 13 2019 Tomas Orsava <torsava@redhat.com> - 2.8.4-4 * Thu Apr 25 2019 Tomas Orsava <torsava@redhat.com> - 2.7.5-7
- Exclude unsupported i686 arch - Bumping due to problems with modular RPM upgrade path
- Resolves: rhbz#1695587
* Wed Dec 11 2019 Tomas Orsava <torsava@redhat.com> - 2.8.4-3 * Wed Sep 26 2018 Tomas Orsava <torsava@redhat.com> - 2.7.5-6
- Fix shebang mangling - Use the fully versioned binaries during build
- Don't ship the debug module, it is not needed and was not shipped in RHEL8 either - Related: rhbz#1619153
* Thu Nov 21 2019 Lumír Balhar <lbalhar@redhat.com> - 2.8.4-2 * Mon Sep 17 2018 Tomas Orsava <torsava@redhat.com> - 2.7.5-5
- Adjusted for Python 3.8 module in RHEL 8 - Require python2-psycopg2 instead of python-psycopg2 from the
python2-psycopg2-debug subpackage
- Resolves: rhbz#1628242
* Wed Nov 06 2019 Lumír Balhar <lbalhar@redhat.com> - 2.8.4-1 * Thu Aug 02 2018 Pavel Raiskup <praiskup@redhat.com> - 2.7.5-4
- New upstream version 2.8.4
- bcond check renamed to bcond tests
* Sun Oct 20 2019 Miro Hrončok <mhroncok@redhat.com> - 2.8.3-2
- Package python2-psycopg2 removed on Fedora 32+ (rhbz#1761216)
* Mon Sep 09 2019 Devrim Gündüz <devrim@gunduz.org> - 2.8.3-1
- Update to 2.8.3
* Mon Sep 09 2019 Miro Hrončok <mhroncok@redhat.com> - 2.7.7-5
- Package python2-psycopg2-debug removed on Fedora 32+ (rhbz#1747670)
* Fri Aug 16 2019 Miro Hrončok <mhroncok@redhat.com> - 2.7.7-4
- Rebuilt for Python 3.8
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 2.7.7-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
* Tue May 14 2019 Miro Hrončok <mhroncok@redhat.com> - 2.7.7-2
- Fixes for 3.8.0a4 rebuild
Resolves: 1693641
* Tue Feb 05 2019 Pavel Raiskup <praiskup@redhat.com> - 2.7.7-1
- update to the latest upstream release
* Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 2.7.5-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
* Wed Oct 03 2018 Pavel Raiskup <praiskup@redhat.com> - 2.7.5-5
- prepare --without=debugrpms option (rhbz#1635166)
- get the python2 packages back for a while (rhbz#1634973)
* Wed Oct 03 2018 Pavel Raiskup <praiskup@redhat.com> - 2.7.5-4
- drop python2* on f30+ (rhbz#1634973)
- use proper compiler/linker flags (rhbz#1631713)
- correct the (build)requires
* Tue Jul 17 2018 Pavel Raiskup <praiskup@redhat.com> - 2.7.5-3
- standalone installable doc subpackage
* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.7.5-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
* Mon Jul 02 2018 Miro Hrončok <mhroncok@redhat.com> - 2.7.5-2
- Rebuilt for Python 3.7
* Mon Jun 18 2018 Pavel Raiskup <praiskup@redhat.com> - 2.7.5-1
- rebase to latest upstream release, per release notes:
http://initd.org/psycopg/articles/2018/06/17/psycopg-275-released/
* Sat Jun 16 2018 Miro Hrončok <mhroncok@redhat.com> - 2.7.4-5
- Rebuilt for Python 3.7
* Mon May 21 2018 Pavel Raiskup <praiskup@redhat.com> - 2.7.4-4
- fix for python 3.7, by mhroncok
* Fri Apr 13 2018 Pavel Raiskup <praiskup@redhat.com> - 2.7.4-3
- depend on postgresql-test-rpm-macros
* Fri Apr 13 2018 Pavel Raiskup <praiskup@redhat.com> - 2.7.4-2
- re-enable testsuite - re-enable testsuite
* Wed Aug 01 2018 Lumír Balhar <lbalhar@redhat.com> - 2.7.5-3
- Disable failing tests
* Wed Jul 18 2018 Tomas Orsava <torsava@redhat.com> - 2.7.5-2
- BuildRequire also python36-rpm-macros as part of the python36 module build
* Tue Jul 17 2018 Pavel Raiskup <praiskup@redhat.com> - 2.7.5-1
- sync with fedora rawhide
* Tue May 01 2018 Tomas Orsava <torsava@redhat.com> - 2.7.4-5
- Let the doc subpackage be standalone installable
* Wed Apr 25 2018 Tomas Orsava <torsava@redhat.com> - 2.7.4-4
- Make requires on python36-devel/debug dependant on a python36_module bcond
* Mon Apr 23 2018 Tomas Orsava <torsava@redhat.com> - 2.7.4-3
- Revert switching Python 3 subpackages to the python3X- prefix
- Switch only the requires for python3-devel/debug to the python36-prefix:
the rest of the packages in the python36 collection will have the python3
prefix to be unified with the Python 3 packages for Platform-Python
* Wed Apr 18 2018 Tomas Orsava <torsava@redhat.com> - 2.7.4-2
- Switch the Python 3 subpackages to the python3X- prefix using
the %{python3_pkgversion} macro
* Mon Feb 12 2018 Pavel Raiskup <praiskup@redhat.com> - 2.7.4-1 * Mon Feb 12 2018 Pavel Raiskup <praiskup@redhat.com> - 2.7.4-1
- rebase to latest upstream release, per release notes: - rebase to latest upstream release, per release notes:
http://initd.org/psycopg/articles/2018/02/08/psycopg-274-released/ http://initd.org/psycopg/articles/2018/02/08/psycopg-274-released/