diff --git a/Python-3.10.11.tar.xz b/Python-3.10.12.tar.xz similarity index 68% rename from Python-3.10.11.tar.xz rename to Python-3.10.12.tar.xz index a8115c52dab73b1faa1b5a261017add818ef0cf8..8a9695fabe90baec4d6478864401e56c7307b6ed 100644 Binary files a/Python-3.10.11.tar.xz and b/Python-3.10.12.tar.xz differ diff --git a/python3.spec b/python3.spec index 11cd41eb5732107ccba95a69db85f8cba945e931..ff05e230cef7115061ffbca19c4dec3e8c521372 100644 --- a/python3.spec +++ b/python3.spec @@ -10,7 +10,7 @@ URL: https://www.python.org/ # WARNING When rebasing to a new Python version, # remember to update the python3-docs package as well -%global general_version %{pybasever}.11 +%global general_version %{pybasever}.12 %global upstream_version %{general_version} Version: %{general_version} Release: %{anolis_release}%{?dist} @@ -82,6 +82,12 @@ License: Python %bcond_with valgrind %endif +%if %{with main_python} +%bcond_without an8_compat_shims +%else +%bcond_with an8_compat_shims +%endif + # ===================== # General global macros # ===================== @@ -268,6 +274,11 @@ Obsoletes: python%{pybasever} Recommends: %{_bindir}/python %endif +%if %{with an8_compat_shims} +Provides: platform-python = %{version}-%{release} +Obsoletes: platform-python < %{pybasever} +%endif + # Python interpreter packages used to be named (or provide) name pythonXY (e.g. # python39). However, to align it with the executable names and to prepare for # Python 3.10, they were renamed to pythonX.Y (e.g. python3.9, python3.10). We @@ -392,6 +403,12 @@ Provides: 2to3 = %{version}-%{release} Conflicts: %{pkgname} < %{version}-%{release} +# Fix upgrade path from anolis 8 +%if %{with an8_compat_shims} +Provides: platform-python-devel = %{version}-%{release} +Obsoletes: platform-python-devel < %{pybasever} +%endif + %description -n %{pkgname}-devel This package contains the header files and configuration needed to compile Python extension modules (typically written in C or C++), to embed Python @@ -465,6 +482,11 @@ Requires: %{pkgname}-test = %{version}-%{release} Requires: %{pkgname}-tkinter = %{version}-%{release} Requires: %{pkgname}-idle = %{version}-%{release} +%if %{with an8_compat_shims} +Provides: platform-python-debug = %{version}-%{release} +Obsoletes: platform-python-debug < %{pybasever} +%endif + %description -n %{pkgname}-debug python3-debug provides a version of the Python runtime with numerous debugging features enabled, aimed at advanced Python users such as developers of Python @@ -856,6 +878,25 @@ ln -s ./python3-debug %{buildroot}%{_bindir}/python-debug %endif %endif +%if %{with an8_compat_shims} +# Provide platform-python backwards compatible symbolic links in %%_libexecdir +mkdir -p %{buildroot}%{_libexecdir} +ln -s %{_bindir}/python%{pybasever} %{buildroot}%{_libexecdir}/platform-python +ln -s %{_bindir}/python%{pybasever} %{buildroot}%{_libexecdir}/platform-python%{pybasever} +ln -s %{_bindir}/python%{pybasever}-config %{buildroot}%{_libexecdir}/platform-python-config +ln -s %{_bindir}/python%{pybasever}-config %{buildroot}%{_libexecdir}/platform-python%{pybasever}-config +ln -s %{_bindir}/python%{pybasever}-`uname -m`-config %{buildroot}%{_libexecdir}/platform-python%{pybasever}-`uname -m`-config +# There were also executables with %%{LDVERSION_optimized} in anolis 8, +# but since Python 3.8 %%{LDVERSION_optimized} == %%{pybasever}. +# We list both in the %%files section to assert this. +%if %{with debug_build} +ln -s %{_bindir}/python%{LDVERSION_debug} %{buildroot}%{_libexecdir}/platform-python-debug +ln -s %{_bindir}/python%{LDVERSION_debug} %{buildroot}%{_libexecdir}/platform-python%{LDVERSION_debug} +ln -s %{_bindir}/python%{LDVERSION_debug}-config %{buildroot}%{_libexecdir}/platform-python%{LDVERSION_debug}-config +ln -s %{_bindir}/python%{LDVERSION_debug}-`uname -m`-config %{buildroot}%{_libexecdir}/platform-python%{LDVERSION_debug}-`uname -m`-config +%endif +%endif + # Remove large, autogenerated sources and keep only the non-optimized pycache for file in %{buildroot}%{pylibdir}/pydoc_data/topics.py $(grep --include='*.py' -lr %{buildroot}%{pylibdir}/encodings -e 'Python Character Mapping Codec .* from .* with gencodec.py'); do directory=$(dirname ${file}) @@ -953,6 +994,12 @@ CheckPython optimized %{_bindir}/python%{LDVERSION_optimized} %{_mandir}/*/*3* +%if %{with an8_compat_shims} +%{_libexecdir}/platform-python +%{_libexecdir}/platform-python%{pybasever} +%{_libexecdir}/platform-python%{LDVERSION_optimized} +%endif + %if %{with main_python} %if %{without flatpackage} @@ -1231,6 +1278,14 @@ CheckPython optimized %{_libdir}/pkgconfig/python-%{pybasever}.pc %{_libdir}/pkgconfig/python-%{pybasever}-embed.pc +%if %{with an8_compat_shims} +%{_libexecdir}/platform-python-config +%{_libexecdir}/platform-python%{pybasever}-config +%{_libexecdir}/platform-python%{LDVERSION_optimized}-config +%{_libexecdir}/platform-python%{pybasever}-*-config +%{_libexecdir}/platform-python%{LDVERSION_optimized}-*-config +%endif + %if %{without flatpackage} %files -n %{pkgname}-idle @@ -1393,6 +1448,13 @@ CheckPython optimized %{_libdir}/pkgconfig/python-%{LDVERSION_debug}.pc %{_libdir}/pkgconfig/python-%{LDVERSION_debug}-embed.pc +%if %{with an8_compat_shims} +%{_libexecdir}/platform-python-debug +%{_libexecdir}/platform-python%{LDVERSION_debug} +%{_libexecdir}/platform-python%{LDVERSION_debug}-config +%{_libexecdir}/platform-python%{LDVERSION_debug}-*-config +%endif + # Analog of the -tools subpackage's files: # None for now; we could build precanned versions that have the appropriate # shebang if needed @@ -1428,6 +1490,10 @@ CheckPython optimized # ====================================================== %changelog +* Wed Jun 07 2023 Funda Wang - 3.10.12-1 +- New version 3.10.12 +- Fix upgrade path from anolis 8 + * Thu Apr 06 2023 Funda Wang - 3.10.11-1 - New version 3.10.11