From 36844da9e7101a99e4e3cb1fd54cab3156647c4594716fc203b4c8b66ae95762 Mon Sep 17 00:00:00 2001 From: Matej Cepl Date: Sat, 26 Mar 2022 22:48:52 +0000 Subject: [PATCH] - bsc#1195831 Obsolete older "most modern" versions of python packages (python39 for python310 and so forth). For next versions it is necessary just to edit the macro. - Remove second superfluous BR rpm-build-python - Add fix_configure_rst.patch, which removes duplicate link targets and make documentation with old Sphinx in SLE - Skip test_capi (bsc#1195140 and bpo#37169) - Upgrade to 3.10.1 (jsc#SLE-18038): OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:Factory/python310?expand=0&rev=32 --- fix_configure_rst.patch | 40 ++++++++++++++++++++++++++++++++++++++++ python310.changes | 17 ++++++++++++++++- python310.spec | 33 ++++++++++++++++++++++++++++++++- 3 files changed, 88 insertions(+), 2 deletions(-) create mode 100644 fix_configure_rst.patch diff --git a/fix_configure_rst.patch b/fix_configure_rst.patch new file mode 100644 index 0000000..c377eb3 --- /dev/null +++ b/fix_configure_rst.patch @@ -0,0 +1,40 @@ +--- + Doc/using/configure.rst | 3 --- + Misc/NEWS | 2 +- + 2 files changed, 1 insertion(+), 4 deletions(-) + +--- a/Doc/using/configure.rst ++++ b/Doc/using/configure.rst +@@ -42,7 +42,6 @@ General Options + + See :data:`sys.int_info.bits_per_digit `. + +-.. cmdoption:: --with-cxx-main + .. cmdoption:: --with-cxx-main=COMPILER + + Compile the Python ``main()`` function and link Python executable with C++ +@@ -457,13 +456,11 @@ macOS Options + + See ``Mac/README.rst``. + +-.. cmdoption:: --enable-universalsdk + .. cmdoption:: --enable-universalsdk=SDKDIR + + Create a universal binary build. *SDKDIR* specifies which macOS SDK should + be used to perform the build (default is no). + +-.. cmdoption:: --enable-framework + .. cmdoption:: --enable-framework=INSTALLDIR + + Create a Python.framework rather than a traditional Unix install. Optional +--- a/Misc/NEWS ++++ b/Misc/NEWS +@@ -1622,7 +1622,7 @@ C API + ----- + + - bpo-43795: The list in :ref:`stable-abi-list` now shows the public name +- :c:struct:`PyFrameObject` rather than ``_frame``. The non-existing entry ++ :c:type:`PyFrameObject` rather than ``_frame``. The non-existing entry + ``_node`` no longer appears in the list. + + - bpo-44378: :c:func:`Py_IS_TYPE` no longer uses :c:func:`Py_TYPE` to avoid diff --git a/python310.changes b/python310.changes index 4fb34ee..d187727 100644 --- a/python310.changes +++ b/python310.changes @@ -4,11 +4,26 @@ Tue Feb 22 05:53:06 UTC 2022 - Steve Kowalik - Add patch support-expat-245.patch: * Support Expat >= 2.4.5 +------------------------------------------------------------------- +Tue Feb 15 23:05:55 UTC 2022 - Matej Cepl + +- bsc#1195831 Obsolete older "most modern" versions of python + packages (python39 for python310 and so forth). For next + versions it is necessary just to edit the macro. + ------------------------------------------------------------------- Tue Jan 25 16:09:25 UTC 2022 - Matej Cepl - Remove second superfluous BR rpm-build-python +------------------------------------------------------------------- +Tue Jan 25 16:09:25 UTC 2022 - Matej Cepl + +- Remove second superfluous BR rpm-build-python +- Add fix_configure_rst.patch, which removes duplicate link + targets and make documentation with old Sphinx in SLE +- Skip test_capi (bsc#1195140 and bpo#37169) + ------------------------------------------------------------------- Wed Jan 19 22:01:51 UTC 2022 - Matej Cepl @@ -21,7 +36,7 @@ Wed Jan 19 22:01:51 UTC 2022 - Matej Cepl ------------------------------------------------------------------- Wed Dec 8 13:07:25 UTC 2021 - Matej Cepl -- Upgrade to 3.10.1: +- Upgrade to 3.10.1 (jsc#SLE-18038): - PEP 623 – Deprecate and prepare for the removal of the wstr member in PyUnicodeObject. - PEP 604 – Allow writing union types as X | Y diff --git a/python310.spec b/python310.spec index ec35622..4ea1952 100644 --- a/python310.spec +++ b/python310.spec @@ -35,6 +35,17 @@ %bcond_with base %bcond_without general %endif + +%if 0%{?sle_version} && 0%{?suse_version} < 1550 +# Obsoleting previous "latest" Python versions +# Next versions will get more lines like for older versions +%define obsolete_python_versioned() \ +Obsoletes: python39%{?1:-%{1}} +%else +%define obsolete_python_versioned() %{nil} +%endif + +# Setting up variables %define _version %(c=%{version}; echo ${c/[a-z]*/}) %define tar_suffix %(c=%{_version}; echo ${c#%{_version}}) %define python_version %(echo %{_version}|cut -d. -f1-2) @@ -146,8 +157,11 @@ Patch33: no-skipif-doctests.patch # PATCH-FIX-SLE skip-test_pyobject_freed_is_freed.patch mcepl@suse.com # skip a test failing on SLE-15 Patch34: skip-test_pyobject_freed_is_freed.patch +# PATCH-FIX-SLE fix_configure_rst.patch bpo#43774 mcepl@suse.com +# remove duplicate link targets and make documentation with old Sphinx in SLE +Patch35: fix_configure_rst.patch # PATCH-FIX-UPSTREAM bpo-46811 gh#python/cpython#7da97f61816f3cadaa6788804b22a2434b40e8c5 -Patch35: support-expat-245.patch +Patch36: support-expat-245.patch BuildRequires: autoconf-archive BuildRequires: automake BuildRequires: fdupes @@ -197,6 +211,7 @@ Requires: %{python_pkg_name}-base = %{version} Recommends: %{python_pkg_name}-curses Recommends: %{python_pkg_name}-dbm Recommends: %{python_pkg_name}-pip +%obsolete_python_versioned %if %{primary_interpreter} Provides: python3 = %{python_version} %endif @@ -219,6 +234,7 @@ development environment (python3-idle). %package -n %{python_pkg_name}-tk Summary: TkInter, a Python Tk Interface Requires: %{python_pkg_name} = %{version} +%obsolete_python_versioned tk %if %{primary_interpreter} Provides: python3-tk = %{version} %endif @@ -229,6 +245,7 @@ Python interface to Tk. Tk is the GUI toolkit that comes with Tcl. %package -n %{python_pkg_name}-curses Summary: Python Interface to the (N)Curses Library Requires: %{python_pkg_name} = %{version} +%obsolete_python_versioned curses %if %{primary_interpreter} Provides: python3-curses %endif @@ -240,6 +257,7 @@ Console User Interface. %package -n %{python_pkg_name}-dbm Summary: Python Interface to the GDBM Library Requires: %{python_pkg_name} = %{version} +%obsolete_python_versioned dbm %if %{primary_interpreter} Provides: python3-dbm %endif @@ -252,6 +270,7 @@ the GNU implementation GDBM. Summary: An Integrated Development Environment for Python Requires: %{python_pkg_name} = %{version} Requires: %{python_pkg_name}-tk +%obsolete_python_versioned idle %if %{primary_interpreter} Provides: python3-idle = %{version} %endif @@ -265,6 +284,7 @@ a debugger. %package -n %{python_pkg_name}-doc Summary: Package Documentation for Python 3 Enhances: %{python_pkg_name} = %{python_version} +%obsolete_python_versioned doc %if %{primary_interpreter} Provides: python3-doc = %{version} %endif @@ -276,6 +296,7 @@ Python, and Macintosh Module Reference in HTML format. %package -n %{python_pkg_name}-doc-devhelp Summary: Additional Package Documentation for Python 3 in devhelp format +%obsolete_python_versioned doc-devhelp %if %{primary_interpreter} Provides: python3-doc-devhelp = %{version} %endif @@ -289,6 +310,7 @@ Python, and Macintosh Module Reference in format for devhelp. Summary: Python 3 Interpreter and Stdlib Core Requires: libpython%{so_version} = %{version} Recommends: %{python_pkg_name} = %{version} +%obsolete_python_versioned base #Recommends: python3-ensurepip # python 3.1 didn't have a separate python-base, so it is wrongly # not a conflict to have python3-3.1 and python3-base > 3.1 @@ -296,8 +318,10 @@ Obsoletes: python3 < 3.2 # no Provides, because python3 is obviously provided by package python3 # python 3.4 provides asyncio Provides: %{python_pkg_name}-asyncio = %{version} +%obsolete_python_versioned asyncio # python 3.6 provides typing Provides: %{python_pkg_name}-typing = %{version} +%obsolete_python_versioned typing # python3-xml was merged into python3, now moved into -base Provides: %{python_pkg_name}-xml = %{version} %if %{primary_interpreter} @@ -327,6 +351,7 @@ Summary: Python Utility and Demonstration Scripts Requires: %{python_pkg_name}-base = %{version} Provides: %{python_pkg_name}-2to3 = %{version} Provides: %{python_pkg_name}-demo = %{version} +%obsolete_python_versioned tools %if %{primary_interpreter} Provides: python3-2to3 = %{version} Provides: python3-demo = %{version} @@ -342,6 +367,7 @@ and a set of demonstration programs. %package -n %{python_pkg_name}-devel Summary: Include Files and Libraries Mandatory for Building Python Modules Requires: %{python_pkg_name}-base = %{version} +%obsolete_python_versioned devel %if %{primary_interpreter} Provides: python3-devel = %{version} %endif @@ -361,6 +387,7 @@ package up to version 2.2.2. Summary: Unit tests for Python and its standard library Requires: %{python_pkg_name} = %{version} Requires: %{python_pkg_name}-tk = %{version} +%obsolete_python_versioned testsuite %if %{primary_interpreter} Provides: python3-testsuite = %{version} %endif @@ -400,6 +427,7 @@ other applications. %patch34 -p1 %endif %patch35 -p1 +%patch36 -p1 # drop Autoconf version requirement sed -i 's/^AC_PREREQ/dnl AC_PREREQ/' configure.ac @@ -525,6 +553,9 @@ EXCLUDE="$EXCLUDE test_faulthandler test_multiprocessing_forkserver test_multipr # done have any such interface breaking the uuid module. EXCLUDE="$EXCLUDE test_uuid" +# bsc#1195140 and bpo#37169 - test_capi is failing on openSUSE, and not sure why +EXCLUDE="$EXCLUDE test_capi" + # Limit virtual memory to avoid spurious failures if test $(ulimit -v) = unlimited || test $(ulimit -v) -gt 10000000; then ulimit -v 10000000 || :