From fa76f91f184690bce79096b4f96221d34e41b426 Mon Sep 17 00:00:00 2001 From: Alfredo Moralejo Date: Sep 11 2021 18:58:12 +0000 Subject: Import python-psycopg2-2.8.6-3.el9 in CloudSIG xena --- diff --git a/.python-psycopg2.metadata b/.python-psycopg2.metadata index 93c132d..30956fb 100644 --- a/.python-psycopg2.metadata +++ b/.python-psycopg2.metadata @@ -1 +1 @@ -4f77e3efcf9a0970be5120352274315f7bd1c754 SOURCES/psycopg2-2.7.5.tar.gz +6230aedfe58e8d5d132b01ac065f47284b21d78c SOURCES/psycopg2-2.8.6.tar.gz diff --git a/SPECS/python-psycopg2.spec b/SPECS/python-psycopg2.spec index bbd3840..6867c8a 100644 --- a/SPECS/python-psycopg2.spec +++ b/SPECS/python-psycopg2.spec @@ -1,22 +1,28 @@ %if 0%{?fedora} - %bcond_without python3 - %if 0%{?fedora} > 29 - %bcond_with python2 - %else - %bcond_without python2 - %endif + %bcond_without python3 + %bcond_without python3_debug + %if 0%{?fedora} > 31 + %bcond_with python2 + %bcond_with python2_debug + %else + %bcond_without python2 + %bcond_without python2_debug + %endif %else - %if 0%{?rhel} > 7 - %bcond_with python2 - %bcond_without python3 - %else - %bcond_without python2 - %bcond_with python3 - %endif + %if 0%{?rhel} > 7 + %bcond_with python2 + %bcond_without python3 + %bcond_with python2_debug + %bcond_without python3_debug + %else + %bcond_without python2 + %bcond_with python3 + %bcond_without python2_debug + %bcond_with python3_debug + %endif %endif -%bcond_without check -%bcond_with debugrpms +%bcond_without tests %global srcname psycopg2 %global sum A PostgreSQL database adapter for Python @@ -25,8 +31,11 @@ programming language. At its core it fully implements the Python DB \ API 2.0 specifications. Several extensions allow access to many of the \ features offered by PostgreSQL. -%global python_runtimes %{?with_python2:python2 %{?with_debugrpms:python2-debug}} \\\ - %{?with_python3:python3 %{?with_debugrpms:python3-debug}} +%global python_runtimes \\\ + %{?with_python2:python2} \\\ + %{?with_python2_debug:python2-debug} \\\ + %{?with_python3:python3} \\\ + %{?with_python3_debug:python3-debug} %{!?with_python2:%{!?with_python3:%{error:one python version needed}}} @@ -40,23 +49,24 @@ features offered by PostgreSQL. Summary: %{sum} Name: python-%{srcname} -Version: 2.7.5 -Release: 7%{?dist} +Version: 2.8.6 +Release: 3%{?dist} # The exceptions allow linking to OpenSSL and PostgreSQL's libpq License: LGPLv3+ with exceptions -Group: Applications/Databases -Url: http://www.psycopg.org/psycopg/ +Url: http://initd.org/psycopg/ -Source0: http://www.psycopg.org/psycopg/tarballs/PSYCOPG-2-7/psycopg2-%{version}.tar.gz +Source0: http://initd.org/psycopg/tarballs/PSYCOPG-2-8/psycopg2-%{version}.tar.gz -%{?with_python2:BuildRequires: %{?with_debugrpms:/usr/bin/python2-debug} python2-devel} -%{?with_python3:BuildRequires: %{?with_debugrpms:/usr/bin/python3-debug} python3-devel} +%{?with_python2:BuildRequires: python2-devel python2-setuptools} +%{?with_python3:BuildRequires: python3-devel python3-setuptools} +%{?with_python2_debug:BuildRequires: python2-debug} +%{?with_python3_debug:BuildRequires: python3-debug} -BuildRequires: gcc -BuildRequires: pkgconfig(libpq) +BuildRequires: gcc +BuildRequires: pkgconfig(libpq) # For testsuite -%if %{with check} +%if %{with tests} BuildRequires: postgresql-test-rpm-macros %endif @@ -82,9 +92,10 @@ Requires: python2-%srcname = %version-%release %description -n python2-%{srcname}-tests %desc This sub-package delivers set of tests for the adapter. +%endif -%if %{with debugrpms} +%if %{with python2_debug} %package -n python2-%{srcname}-debug Summary: A PostgreSQL database adapter for Python 2 (debug build) # Require the base package, as we're sharing .py/.pyc files: @@ -94,8 +105,7 @@ Requires: python2-%{srcname} = %{version}-%{release} %description -n python2-%{srcname}-debug This is a build of the psycopg PostgreSQL database adapter for the debug build of Python 2. -%endif # debugrpms -%endif # python2 +%endif %if %{with python3} @@ -114,9 +124,10 @@ Requires: python3-%srcname = %version-%release %description -n python3-%{srcname}-tests %desc This sub-package delivers set of tests for the adapter. +%endif -%if %{with debugrpms} +%if %{with python3_debug} %package -n python3-psycopg2-debug Summary: A PostgreSQL database adapter for Python 3 (debug build) # Require base python 3 package, as we're sharing .py/.pyc files: @@ -125,13 +136,11 @@ Requires: python3-psycopg2 = %{version}-%{release} %description -n python3-%{srcname}-debug This is a build of the psycopg PostgreSQL database adapter for the debug build of Python 3. -%endif # debugrpms -%endif # python3 +%endif %package doc 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}} @@ -145,7 +154,6 @@ database adapter. Summary: Zope Database Adapter ZPsycopgDA # The exceptions allow linking to OpenSSL and PostgreSQL's libpq License: GPLv2+ with exceptions or ZPLv1.0 -Group: Applications/Databases Requires: %{name} = %{version}-%{release} Requires: zope @@ -169,7 +177,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 # 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: # https://www.postgresql.org/message-id/2741387.dvL6Cb0VMB@nb.usersys.redhat.com @@ -177,7 +185,7 @@ rm -f doc/html/.buildinfo %check -%if %{with check} +%if %{with tests} export PGTESTS_LOCALE=C.UTF-8 %postgresql_tests_run @@ -185,7 +193,7 @@ export PSYCOPG2_TESTDB=${PGTESTS_DATABASES##*:} export PSYCOPG2_TESTDB_HOST=$PGHOST export PSYCOPG2_TESTDB_PORT=$PGPORT -cmd="from psycopg2 import tests; tests.unittest.main(defaultTest='tests.test_suite')" +cmd="import tests; tests.unittest.main(defaultTest='tests.test_suite')" %if %{with python2} PYTHONPATH=%buildroot%python2_sitearch %__python2 -c "$cmd" --verbose @@ -193,7 +201,7 @@ PYTHONPATH=%buildroot%python2_sitearch %__python2 -c "$cmd" --verbose %if %{with python3} PYTHONPATH=%buildroot%python3_sitearch %__python3 -c "$cmd" --verbose %endif -%endif # check +%endif %install @@ -202,9 +210,23 @@ for python in %{python_runtimes} ; do $python setup.py install --no-compile --root %{buildroot} 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|#!/usr/bin/python3|' $i +done +%endif + %if %zope -install -d %{buildroot}%{ZPsycopgDAdir} -cp -pr ZPsycopgDA/* %{buildroot}%{ZPsycopgDAdir} +%{__install} -d %{buildroot}%{ZPsycopgDAdir} +%{__cp} -pr ZPsycopgDA/* %{buildroot}%{ZPsycopgDAdir} %endif # This test is skipped on 3.7 and has a syntax error so brp-python-bytecompile would choke on it @@ -224,14 +246,14 @@ cp -pr ZPsycopgDA/* %{buildroot}%{ZPsycopgDAdir} %files -n python2-%{srcname}-tests %{python2_sitearch}/psycopg2/tests +%endif -%if %{with debugrpms} +%if %{with python2_debug} %files -n python2-%{srcname}-debug %license LICENSE %{python2_sitearch}/psycopg2/_psycopg_d.so -%endif # debugrpms -%endif # python2 +%endif %if %{with python3} @@ -240,7 +262,7 @@ cp -pr ZPsycopgDA/* %{buildroot}%{ZPsycopgDAdir} %doc AUTHORS NEWS README.rst %dir %{python3_sitearch}/psycopg2 %{python3_sitearch}/psycopg2/*.py -%{python3_sitearch}/psycopg2/_psycopg.cpython-3?m*.so +%{python3_sitearch}/psycopg2/_psycopg.cpython-%{python3_version_nodots}[!d]*.so %dir %{python3_sitearch}/psycopg2/__pycache__ %{python3_sitearch}/psycopg2/__pycache__/*.py{c,o} %{python3_sitearch}/psycopg2-%{version}-py3*.egg-info @@ -248,19 +270,19 @@ cp -pr ZPsycopgDA/* %{buildroot}%{ZPsycopgDAdir} %files -n python3-%{srcname}-tests %{python3_sitearch}/psycopg2/tests +%endif -%if %{with debugrpms} +%if %{with python3_debug} %files -n python3-psycopg2-debug %license LICENSE -%{python3_sitearch}/psycopg2/_psycopg.cpython-3?dm*.so -%endif # debugrpms -%endif # python3 +%{python3_sitearch}/psycopg2/_psycopg.cpython-%{python3_version_nodots}d*.so +%endif %files doc %license LICENSE -%doc doc examples/ +%doc doc %if %zope @@ -276,39 +298,89 @@ cp -pr ZPsycopgDA/* %{buildroot}%{ZPsycopgDAdir} %changelog -* Fri Oct 05 2018 Pavel Raiskup - 2.7.5-7 -- bump the NVR to beat the NVR from module +* Mon Feb 08 2021 Pavel Raiskup - 2.8.6-3 +- rebuild for libpq ABI fix rhbz#1908268 + +* Wed Jan 27 2021 Fedora Release Engineering - 2.8.6-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild + +* Thu Sep 17 2020 Patrik Novotný - 2.8.6-1 +- Rebase to upstream version 2.8.6 + +* Wed Jul 29 2020 Fedora Release Engineering - 2.8.5-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + +* Sat May 23 2020 Miro Hrončok - 2.8.5-2 +- Rebuilt for Python 3.9 + +* Tue Apr 21 2020 Patrik Novotný - 2.8.5-1 +- Rebase to upstream version 2.8.5 + +* Thu Jan 30 2020 Fedora Release Engineering - 2.8.4-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild + +* Wed Nov 06 2019 Lumír Balhar - 2.8.4-1 +- New upstream version 2.8.4 +- bcond check renamed to bcond tests + +* Sun Oct 20 2019 Miro Hrončok - 2.8.3-2 +- Package python2-psycopg2 removed on Fedora 32+ (rhbz#1761216) + +* Mon Sep 09 2019 Devrim Gündüz - 2.8.3-1 +- Update to 2.8.3 + +* Mon Sep 09 2019 Miro Hrončok - 2.7.7-5 +- Package python2-psycopg2-debug removed on Fedora 32+ (rhbz#1747670) + +* Fri Aug 16 2019 Miro Hrončok - 2.7.7-4 +- Rebuilt for Python 3.8 + +* Fri Jul 26 2019 Fedora Release Engineering - 2.7.7-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild + +* Tue May 14 2019 Miro Hrončok - 2.7.7-2 +- Fixes for 3.8.0a4 rebuild + Resolves: 1693641 + +* Tue Feb 05 2019 Pavel Raiskup - 2.7.7-1 +- update to the latest upstream release + +* Sat Feb 02 2019 Fedora Release Engineering - 2.7.5-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild * Wed Oct 03 2018 Pavel Raiskup - 2.7.5-5 -- sync with Fedora Rawide +- prepare --without=debugrpms option (rhbz#1635166) +- get the python2 packages back for a while (rhbz#1634973) -* Thu Aug 02 2018 Pavel Raiskup - 2.7.5-4 -- re-enable testsuite +* Wed Oct 03 2018 Pavel Raiskup - 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 - 2.7.5-3 +- standalone installable doc subpackage -* Wed Aug 01 2018 Lumír Balhar - 2.7.5-3 -- Disable failing tests +* Sat Jul 14 2018 Fedora Release Engineering - 2.7.5-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild -* Wed Jul 18 2018 Tomas Orsava - 2.7.5-2 -- BuildRequire also python36-rpm-macros as part of the python36 module build +* Mon Jul 02 2018 Miro Hrončok - 2.7.5-2 +- Rebuilt for Python 3.7 -* Tue Jul 17 2018 Pavel Raiskup - 2.7.5-1 -- sync with fedora rawhide +* Mon Jun 18 2018 Pavel Raiskup - 2.7.5-1 +- rebase to latest upstream release, per release notes: + http://initd.org/psycopg/articles/2018/06/17/psycopg-275-released/ -* Tue May 01 2018 Tomas Orsava - 2.7.4-5 -- Let the doc subpackage be standalone installable +* Sat Jun 16 2018 Miro Hrončok - 2.7.4-5 +- Rebuilt for Python 3.7 -* Wed Apr 25 2018 Tomas Orsava - 2.7.4-4 -- Make requires on python36-devel/debug dependant on a python36_module bcond +* Mon May 21 2018 Pavel Raiskup - 2.7.4-4 +- fix for python 3.7, by mhroncok -* Mon Apr 23 2018 Tomas Orsava - 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 +* Fri Apr 13 2018 Pavel Raiskup - 2.7.4-3 +- depend on postgresql-test-rpm-macros -* Wed Apr 18 2018 Tomas Orsava - 2.7.4-2 -- Switch the Python 3 subpackages to the python3X- prefix using - the %{python3_pkgversion} macro +* Fri Apr 13 2018 Pavel Raiskup - 2.7.4-2 +- re-enable testsuite * Mon Feb 12 2018 Pavel Raiskup - 2.7.4-1 - rebase to latest upstream release, per release notes: