forked from pool/python311
Rewrite structure of Python interpreter packages
`python3*` symbols should be now provided by real python3 packages and
its subpackages instead of the virtual provides.
Includes many small fixes:
* fixe the shebang of Tools/gdb/libpython.py to the versioned Python
* skip rpm-build-python BuildRequires for the base flavor
rpm-build-python (from python-rpm-packaging) has a runtime Requires
on python3-base. Since the base flavor is what produces python3-base,
this creates an unresolvable bootstrap cycle in OBS when the package
is not yet present in the project repo. Guard the BuildRequires with
%{without base} to break the cycle.
* explicitly provide `python(abi)` symbol
rpm-build-python (which auto-generates this) cannot be installed in
the base flavor build root due to a bootstrap cycle: rpm-build-python
-> python3-base -> (this package)
References: https://bugzilla.suse.com/show_bug.cgi?id=1258364
This commit is contained in:
+10
-7
@@ -5,6 +5,14 @@ Wed Apr 15 18:00:50 UTC 2026 - Matej Cepl <mcepl@cepl.eu>
|
||||
excess Base64 data after the first padded quad (bsc#1261970,
|
||||
CVE-2026-3446, gh#python/cpython#145264).
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Apr 8 16:12:36 CEST 2026 - Matej Cepl <mcepl@suse.com>
|
||||
|
||||
- Rewrite structure of Python interpreter packages.
|
||||
`python3*` symbols should be now provided by real python3
|
||||
packages and its subpackages instead of the virtual provides
|
||||
(bsc#1258364).
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Apr 2 13:55:57 UTC 2026 - Matej Cepl <mcepl@cepl.eu>
|
||||
|
||||
@@ -3238,11 +3246,6 @@ Tue Feb 15 23:05:55 UTC 2022 - Matej Cepl <mcepl@suse.com>
|
||||
-------------------------------------------------------------------
|
||||
Tue Jan 25 16:09:25 UTC 2022 - Matej Cepl <mcepl@suse.com>
|
||||
|
||||
- Remove second superfluous BR rpm-build-python
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Jan 25 16:09:25 UTC 2022 - Matej Cepl <mcepl@suse.com>
|
||||
|
||||
- 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
|
||||
@@ -4711,7 +4714,7 @@ Tue Apr 9 01:21:45 CEST 2019 - Matej Cepl <mcepl@suse.com>
|
||||
- python-3.6.0-multilib.patch
|
||||
- raise_SIGING_not_handled.patch
|
||||
|
||||
------------------------------------------------------------------
|
||||
-------------------------------------------------------------------
|
||||
Wed Mar 20 14:59:58 UTC 2019 - Matěj Cepl <mcepl@suse.com>
|
||||
|
||||
- Remove building of Qt Develop help files.
|
||||
@@ -5070,7 +5073,7 @@ Sat Mar 31 19:41:12 UTC 2018 - mimi.vx@gmail.com
|
||||
- drop fix-localeconv-encoding-for-LC_NUMERIC.patch
|
||||
- refresh python-3.6.0-multilib-new.patch
|
||||
|
||||
------------------------------------------------------------------
|
||||
-------------------------------------------------------------------
|
||||
Wed Mar 7 09:16:39 UTC 2018 - adam@mizerski.pl
|
||||
|
||||
- Created %so_major and %so_minor macros
|
||||
|
||||
+14
-70
@@ -235,8 +235,10 @@ BuildRequires: pkgconfig(libffi)
|
||||
BuildRequires: pkgconfig(uuid)
|
||||
BuildRequires: pkgconfig(zlib)
|
||||
#!BuildIgnore: gdk-pixbuf-loader-rsvg
|
||||
%if 0%{?suse_version} >= 1550
|
||||
%if 0%{?suse_version} >= 1550 && %{without base}
|
||||
# The provider for python(abi) is in rpm-build-python
|
||||
# Skip for the base flavor: rpm-build-python requires python3-base, which
|
||||
# creates an unresolvable dependency loop when building python3xx-base itself.
|
||||
BuildRequires: rpm-build-python
|
||||
%endif
|
||||
%if 0%{?suse_version} >= 1500 && 0%{?suse_version} < 1599
|
||||
@@ -268,11 +270,6 @@ Provides: %{python_pkg_name}-sqlite3
|
||||
Recommends: %{python_pkg_name}-curses
|
||||
Recommends: %{python_pkg_name}-dbm
|
||||
Recommends: %{python_pkg_name}-pip
|
||||
%if %{primary_interpreter}
|
||||
Provides: python3 = %{python_version}
|
||||
Provides: python3-readline
|
||||
Provides: python3-sqlite3
|
||||
%endif
|
||||
%endif
|
||||
%{?suse_build_hwcaps_libs}
|
||||
|
||||
@@ -293,9 +290,6 @@ development environment (python3-idle).
|
||||
%package -n %{python_pkg_name}-tk
|
||||
Summary: TkInter, a Python Tk Interface
|
||||
Requires: %{python_pkg_name} = %{version}
|
||||
%if %{primary_interpreter}
|
||||
Provides: python3-tk = %{version}
|
||||
%endif
|
||||
|
||||
%description -n %{python_pkg_name}-tk
|
||||
Python interface to Tk. Tk is the GUI toolkit that comes with Tcl.
|
||||
@@ -303,9 +297,6 @@ 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}
|
||||
%if %{primary_interpreter}
|
||||
Provides: python3-curses
|
||||
%endif
|
||||
|
||||
%description -n %{python_pkg_name}-curses
|
||||
An easy to use interface to the (n)curses CUI library. CUI stands for
|
||||
@@ -314,9 +305,6 @@ Console User Interface.
|
||||
%package -n %{python_pkg_name}-dbm
|
||||
Summary: Python Interface to the GDBM Library
|
||||
Requires: %{python_pkg_name} = %{version}
|
||||
%if %{primary_interpreter}
|
||||
Provides: python3-dbm
|
||||
%endif
|
||||
|
||||
%description -n %{python_pkg_name}-dbm
|
||||
An easy to use interface for Unix DBM databases, and more specifically,
|
||||
@@ -326,9 +314,6 @@ the GNU implementation GDBM.
|
||||
Summary: An Integrated Development Environment for Python
|
||||
Requires: %{python_pkg_name} = %{version}
|
||||
Requires: %{python_pkg_name}-tk
|
||||
%if %{primary_interpreter}
|
||||
Provides: python3-idle = %{version}
|
||||
%endif
|
||||
|
||||
%description -n %{python_pkg_name}-idle
|
||||
IDLE is a Tkinter based integrated development environment for Python.
|
||||
@@ -339,9 +324,6 @@ a debugger.
|
||||
%package -n %{python_pkg_name}-doc
|
||||
Summary: Package Documentation for Python 3
|
||||
Enhances: %{python_pkg_name} = %{python_version}
|
||||
%if %{primary_interpreter}
|
||||
Provides: python3-doc = %{version}
|
||||
%endif
|
||||
|
||||
%description -n %{python_pkg_name}-doc
|
||||
Tutorial, Global Module Index, Language Reference, Library Reference,
|
||||
@@ -350,9 +332,6 @@ 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
|
||||
%if %{primary_interpreter}
|
||||
Provides: python3-doc-devhelp = %{version}
|
||||
%endif
|
||||
|
||||
%description -n %{python_pkg_name}-doc-devhelp
|
||||
Tutorial, Global Module Index, Language Reference, Library Reference,
|
||||
@@ -374,16 +353,10 @@ Provides: %{python_pkg_name}-asyncio = %{version}
|
||||
Provides: %{python_pkg_name}-typing = %{version}
|
||||
# python3-xml was merged into python3, now moved into -base
|
||||
Provides: %{python_pkg_name}-xml = %{version}
|
||||
%if %{primary_interpreter}
|
||||
Provides: python3-asyncio = %{version}
|
||||
Obsoletes: python3-asyncio < %{version}
|
||||
Provides: python3-base = %{version}
|
||||
Obsoletes: python3-base < %{version}
|
||||
Provides: python3-typing = %{version}
|
||||
Obsoletes: python3-typing < %{version}
|
||||
Provides: python3-xml = %{version}
|
||||
Obsoletes: python3-xml < %{version}
|
||||
%endif
|
||||
# Explicitly provided because rpm-build-python (which auto-generates this)
|
||||
# cannot be installed in the base flavor build root due to a bootstrap cycle:
|
||||
# rpm-build-python -> python3-base -> (this package)
|
||||
Provides: python(abi) = %{python_version}
|
||||
|
||||
%description -n %{python_pkg_name}-base
|
||||
Python is an interpreted, object-oriented programming language, and is
|
||||
@@ -401,13 +374,6 @@ Summary: Python Utility and Demonstration Scripts
|
||||
Requires: %{python_pkg_name}-base = %{version}
|
||||
Provides: %{python_pkg_name}-2to3 = %{version}
|
||||
Provides: %{python_pkg_name}-demo = %{version}
|
||||
%if %{primary_interpreter}
|
||||
Provides: python3-2to3 = %{version}
|
||||
Provides: python3-demo = %{version}
|
||||
Provides: python3-tools = %{version}
|
||||
Obsoletes: python3-2to3 < %{version}
|
||||
Obsoletes: python3-demo < %{version}
|
||||
%endif
|
||||
|
||||
%description -n %{python_pkg_name}-tools
|
||||
A number of scripts that are useful for building, testing or extending Python,
|
||||
@@ -416,9 +382,6 @@ 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}
|
||||
%if %{primary_interpreter}
|
||||
Provides: python3-devel = %{version}
|
||||
%endif
|
||||
|
||||
%description -n %{python_pkg_name}-devel
|
||||
The Python programming language's interpreter can be extended with
|
||||
@@ -435,9 +398,6 @@ 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}
|
||||
%if %{primary_interpreter}
|
||||
Provides: python3-testsuite = %{version}
|
||||
%endif
|
||||
|
||||
%description -n %{python_pkg_name}-testsuite
|
||||
Unit tests that are useful for verifying integrity and functionality
|
||||
@@ -734,20 +694,12 @@ for dir in curses dbm sqlite3 tkinter idlelib; do
|
||||
done
|
||||
rm -fv %{buildroot}%{dynlib nis}
|
||||
|
||||
# overwrite the copied binary with a link
|
||||
ln -sf python%{python_version} %{buildroot}%{_bindir}/python3
|
||||
|
||||
# decide to ship python3 or just python3.X
|
||||
%if !%{primary_interpreter}
|
||||
# base
|
||||
rm %{buildroot}%{_bindir}/python3
|
||||
rm %{buildroot}%{_bindir}/pydoc3
|
||||
rm %{buildroot}%{_mandir}/man1/python3.1
|
||||
# devel
|
||||
rm %{buildroot}%{_bindir}/python3-config
|
||||
rm %{buildroot}%{_libdir}/libpython3.so
|
||||
rm %{buildroot}%{_libdir}/pkgconfig/{python3,python3-embed}.pc
|
||||
%endif
|
||||
|
||||
%if %{with externally_managed}
|
||||
# PEP-0668 mark this as a distro maintained python
|
||||
@@ -785,7 +737,13 @@ rm -r $PDOCS/Tools/gdb
|
||||
find "$PDOCS" -name "*.bat" -delete
|
||||
|
||||
# put gdb helper script into place
|
||||
install -m 755 -D Tools/gdb/libpython.py %{buildroot}%{_datadir}/gdb/auto-load/%{_libdir}/libpython%{python_abi}.so.%{so_major}.%{so_minor}-gdb.py
|
||||
%define gdb_help_script libpython%{python_abi}.so.%{so_major}.%{so_minor}-gdb.py
|
||||
install -m 755 -D Tools/gdb/libpython.py \
|
||||
%{buildroot}%{_datadir}/gdb/auto-load/%{_libdir}/%{gdb_help_script}
|
||||
# don't use %python311_fix_shebang_path to avoid circular dependency via
|
||||
# python-rpm-macros
|
||||
sed -i "1s@#\!.*python[^ ]*@#\!%{_bindir}/python%{python_version}@" \
|
||||
%{buildroot}%{_datadir}/gdb/auto-load/%{_libdir}/%{gdb_help_script}
|
||||
|
||||
# install devel files to /config
|
||||
#cp Makefile Makefile.pre.in Makefile.pre $RPM_BUILD_ROOT%%{sitedir}/config-%%{python_abi}/
|
||||
@@ -902,16 +860,10 @@ fi
|
||||
|
||||
%files -n %{python_pkg_name}-devel
|
||||
%{_libdir}/libpython%{python_abi}.so
|
||||
%if %{primary_interpreter}
|
||||
%{_libdir}/libpython3.so
|
||||
%endif
|
||||
%{_libdir}/pkgconfig/*
|
||||
%{_includedir}/python%{python_abi}
|
||||
%{sitedir}/config-%{python_abi}-*
|
||||
%{_bindir}/python%{python_abi}-config
|
||||
%if %{primary_interpreter}
|
||||
%{_bindir}/python3-config
|
||||
%endif
|
||||
# Own these directories to not depend on gdb
|
||||
%dir %{_datadir}/gdb
|
||||
%dir %{_datadir}/gdb/auto-load
|
||||
@@ -941,9 +893,6 @@ fi
|
||||
%doc %{_docdir}/%{name}/README.rst
|
||||
%license LICENSE
|
||||
%doc %{_docdir}/%{name}/README.SUSE
|
||||
%if %{primary_interpreter}
|
||||
%{_mandir}/man1/python3.1%{?ext_man}
|
||||
%endif
|
||||
%{_mandir}/man1/python%{python_version}.1%{?ext_man}
|
||||
%if %{with externally_managed}
|
||||
# PEP-0668
|
||||
@@ -1060,11 +1009,6 @@ fi
|
||||
# import-failed hooks
|
||||
%{sitedir}/_import_failed
|
||||
%{sitedir}/site-packages/zzzz-import-failed-hooks.pth
|
||||
# symlinks
|
||||
%if %{primary_interpreter}
|
||||
%{_bindir}/python3
|
||||
%{_bindir}/pydoc3
|
||||
%endif
|
||||
# executables
|
||||
%attr(755, root, root) %{_bindir}/pydoc%{python_version}
|
||||
# %%attr(755, root, root) %%{_bindir}/python%%{python_abi}
|
||||
|
||||
Reference in New Issue
Block a user