Small spec file changes
- Fix small mistakes around main_python bcond - Merge two main_python ǐf blocks - Declare not supported combination of flatpackage enabled and main_python enabled
This commit is contained in:
parent
6da7cc6631
commit
04353ec4a3
@ -41,6 +41,7 @@ License: Python
|
|||||||
|
|
||||||
# Flat package, i.e. no separate subpackages
|
# Flat package, i.e. no separate subpackages
|
||||||
# Default (in Fedora): if this is a main Python, it is not a flatpackage
|
# Default (in Fedora): if this is a main Python, it is not a flatpackage
|
||||||
|
# Not supported: Combination of flatpackage enabled and main_python enabled
|
||||||
%if %{with main_python}
|
%if %{with main_python}
|
||||||
%bcond_with flatpackage
|
%bcond_with flatpackage
|
||||||
%else
|
%else
|
||||||
@ -313,34 +314,19 @@ third-party libraries.
|
|||||||
%package -n %{pkgname}
|
%package -n %{pkgname}
|
||||||
Summary: Python %{pybasever} interpreter
|
Summary: Python %{pybasever} interpreter
|
||||||
|
|
||||||
# People might want to dnf install pythonX.Y instead of pythonXY;
|
|
||||||
# we enable this in both flat and nonflat package.
|
|
||||||
Provides: python%{pybasever} = %{version}-%{release}
|
|
||||||
%else
|
|
||||||
# Provide python3X from python3
|
|
||||||
Provides: python%{pyshortver} = %{version}-%{release}
|
|
||||||
Provides: python%{pyshortver}%{?_isa} = %{version}-%{release}
|
|
||||||
%endif
|
|
||||||
|
|
||||||
# Packages with Python modules in standard locations automatically
|
|
||||||
# depend on python(abi). Provide that here.
|
|
||||||
Provides: python(abi) = %{pybasever}
|
|
||||||
|
|
||||||
Requires: %{pkgname}-libs%{?_isa} = %{version}-%{release}
|
|
||||||
|
|
||||||
# In order to support multiple Python interpreters for development purposes,
|
# In order to support multiple Python interpreters for development purposes,
|
||||||
# packages with the naming scheme flatpackage (e.g. python35) exist for
|
# packages with the naming scheme flatpackage (e.g. python35) exist for
|
||||||
# non-default versions of Python 3.
|
# non-default versions of Python 3.
|
||||||
# For consistency, and to keep the upgrade path clean, we Provide/Obsolete
|
# For consistency, we provide python3X from python3 as well.
|
||||||
# these names here.
|
|
||||||
Provides: python%{pyshortver} = %{version}-%{release}
|
Provides: python%{pyshortver} = %{version}-%{release}
|
||||||
|
Provides: python%{pyshortver}%{?_isa} = %{version}-%{release}
|
||||||
|
# To keep the upgrade path clean, we Obsolete python3X.
|
||||||
# Note that using Obsoletes without package version is not standard practice.
|
# Note that using Obsoletes without package version is not standard practice.
|
||||||
# Here we assert that *any* version of the system's default interpreter is
|
# Here we assert that *any* version of the system's default interpreter is
|
||||||
# preferable to an "extra" interpreter. For example, python3-3.6.1 will
|
# preferable to an "extra" interpreter. For example, python3-3.6.1 will
|
||||||
# replace python36-3.6.2.
|
# replace python36-3.6.2.
|
||||||
Obsoletes: python%{pyshortver}
|
Obsoletes: python%{pyshortver}
|
||||||
|
|
||||||
%if %{with main_python}
|
|
||||||
# https://fedoraproject.org/wiki/Changes/Move_usr_bin_python_into_separate_package
|
# https://fedoraproject.org/wiki/Changes/Move_usr_bin_python_into_separate_package
|
||||||
# https://fedoraproject.org/wiki/Changes/Python_means_Python3
|
# https://fedoraproject.org/wiki/Changes/Python_means_Python3
|
||||||
# We recommend /usr/bin/python so users get it by default
|
# We recommend /usr/bin/python so users get it by default
|
||||||
@ -349,6 +335,18 @@ Obsoletes: python%{pyshortver}
|
|||||||
Recommends: %{_bindir}/python
|
Recommends: %{_bindir}/python
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
# People might want to dnf install pythonX.Y instead of pythonX/pythonXY.
|
||||||
|
# Here it is for the nonflat package, regardless if main_pythn (e.g. python3)
|
||||||
|
# or not (e.g. python39).
|
||||||
|
# For the flat package, the provide is repeated many lines later.
|
||||||
|
Provides: python%{pybasever} = %{version}-%{release}
|
||||||
|
|
||||||
|
# Packages with Python modules in standard locations automatically
|
||||||
|
# depend on python(abi). Provide that here.
|
||||||
|
Provides: python(abi) = %{pybasever}
|
||||||
|
|
||||||
|
Requires: %{pkgname}-libs%{?_isa} = %{version}-%{release}
|
||||||
|
|
||||||
# In Fedora 31, /usr/bin/pydoc was moved here from Python 2.
|
# In Fedora 31, /usr/bin/pydoc was moved here from Python 2.
|
||||||
# Ideally we'd have an explicit conflict with "/usr/bin/pydoc < 3",
|
# Ideally we'd have an explicit conflict with "/usr/bin/pydoc < 3",
|
||||||
# but file provides aren't versioned and the file moved across packages.
|
# but file provides aren't versioned and the file moved across packages.
|
||||||
|
Loading…
Reference in New Issue
Block a user