Build Python 3.11 with subpackages (by disabling the flatpackage bcond)
No change in not providing `python(abi)` for alternative Python versions Resolves: rhbz#2063227
This commit is contained in:
parent
fdfd6c1d94
commit
8055248c0e
|
@ -40,13 +40,10 @@ License: Python
|
|||
%endif
|
||||
|
||||
# Flat package, i.e. no separate subpackages
|
||||
# Default (in Fedora): if this is a main Python, it is not a flatpackage
|
||||
# Default (in Fedora): don't use the flatpackage structure for Python 3.11 and
|
||||
# higher, remove the bcond from the spec in the future
|
||||
# Not supported: Combination of flatpackage enabled and main_python enabled
|
||||
%if %{with main_python}
|
||||
%bcond_with flatpackage
|
||||
%else
|
||||
%bcond_without flatpackage
|
||||
%endif
|
||||
|
||||
# When bootstrapping python3, we need to build setuptools.
|
||||
# but setuptools BR python3-devel and that brings in python3-rpm-generators;
|
||||
|
@ -330,6 +327,13 @@ Patch371: 00371-revert-bpo-1596321-fix-threading-_shutdown-for-the-main-thread-g
|
|||
# Descriptions, and metadata for subpackages
|
||||
# ==========================================
|
||||
|
||||
%if %{without main_python}
|
||||
# We'll not provide this, on purpose
|
||||
# No package in Fedora shall ever depend on a alternative Python via this
|
||||
%global __requires_exclude ^python\\(abi\\) = 3\\..+
|
||||
%global __provides_exclude ^python\\(abi\\) = 3\\..+
|
||||
%endif # without main_python
|
||||
|
||||
# this if branch is ~300 lines long and contains subpackages' definitions
|
||||
%if %{without flatpackage}
|
||||
%if %{with main_python}
|
||||
|
@ -374,9 +378,11 @@ Recommends: %{_bindir}/python
|
|||
Provides: python%{pyshortver} = %{version}-%{release}
|
||||
Obsoletes: python%{pyshortver} < %{version}-%{release}
|
||||
|
||||
%if %{with main_python}
|
||||
# Packages with Python modules in standard locations automatically
|
||||
# depend on python(abi). Provide that here.
|
||||
Provides: python(abi) = %{pybasever}
|
||||
%endif # with main_python
|
||||
|
||||
Requires: %{pkgname}-libs%{?_isa} = %{version}-%{release}
|
||||
|
||||
|
@ -489,7 +495,10 @@ Requires: (python3-rpm-generators if rpm-build)
|
|||
%endif
|
||||
|
||||
Provides: %{pkgname}-2to3 = %{version}-%{release}
|
||||
|
||||
%if %{with main_python}
|
||||
Provides: 2to3 = %{version}-%{release}
|
||||
%endif
|
||||
|
||||
Conflicts: %{pkgname} < %{version}-%{release}
|
||||
|
||||
|
@ -507,8 +516,10 @@ Summary: A basic graphical development environment for Python
|
|||
Requires: %{pkgname} = %{version}-%{release}
|
||||
Requires: %{pkgname}-tkinter = %{version}-%{release}
|
||||
|
||||
%if %{with main_python}
|
||||
Provides: idle3 = %{version}-%{release}
|
||||
Provides: idle = %{version}-%{release}
|
||||
%endif
|
||||
|
||||
Provides: %{pkgname}-tools = %{version}-%{release}
|
||||
Provides: %{pkgname}-tools%{?_isa} = %{version}-%{release}
|
||||
|
@ -586,11 +597,6 @@ The debug runtime additionally supports debug builds of C-API extensions
|
|||
|
||||
%else # with flatpackage
|
||||
|
||||
# We'll not provide this, on purpose
|
||||
# No package in Fedora shall ever depend on flatpackage via this
|
||||
%global __requires_exclude ^python\\(abi\\) = 3\\..+
|
||||
%global __provides_exclude ^python\\(abi\\) = 3\\..+
|
||||
|
||||
# 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
|
||||
|
|
Loading…
Reference in New Issue