From bcf86c38e108b15f7eeaa5e6fae6f81a93ff4759 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Mon, 28 Jan 2019 12:54:13 +0100 Subject: [PATCH] Clean old cruft, provide pythonX.Y In diff order: - gdbm releases in all Fedoras are long above 1:1.13 - the flat package should be called python3.7 but we are lazy to rename - system-python is long gone, upgrade path works - python3-enum34 is only required by 2 pkgs [0][1] - glibc releases in all Fedoras are long above 2.24.90-26 Not removed: - platform-python obsoletes shall be removed in Fedora 31, they were added in 28 [0] https://src.fedoraproject.org/rpms/python-qt5/pull-request/3 [1] https://src.fedoraproject.org/rpms/python-taskflow/pull-request/1 --- python36.spec | 50 +++++--------------------------------------------- 1 file changed, 5 insertions(+), 45 deletions(-) diff --git a/python36.spec b/python36.spec index 11f3b58..b2a56a9 100644 --- a/python36.spec +++ b/python36.spec @@ -181,7 +181,7 @@ BuildRequires: expat-devel BuildRequires: findutils BuildRequires: gcc-c++ %if %{with gdbm} -BuildRequires: gdbm-devel >= 1:1.13 +BuildRequires: gdbm-devel %endif BuildRequires: glibc-all-langpacks BuildRequires: glibc-devel @@ -376,18 +376,16 @@ Patch318: 00318-test-ssl-fix-for-tls-13.patch # Descriptions, and metadata for subpackages # ========================================== +# 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} + %if %{without flatpackage} # Packages with Python modules in standard locations automatically # depend on python(abi). Provide that here. Provides: python(abi) = %{pybasever} -# For backward compatibility only, remove in F29: -Provides: system-python(abi) = %{pybasever} -Provides: system-python = %{version}-%{release} -Provides: system-python%{?_isa} = %{version}-%{release} -Obsoletes: system-python < %{version}-%{release} - Requires: %{name}-libs%{?_isa} = %{version}-%{release} # In order to support multiple Python interpreters for development purposes, @@ -447,20 +445,6 @@ the "%{name}-" prefix. %package libs Summary: Python runtime libraries -# The "enum" module is included in the standard library. -# Provide an upgrade path from the external library. -Provides: python3-enum34 = 1.0.4-5%{?dist} -Obsoletes: python3-enum34 < 1.0.4-5%{?dist} - -# Python 3 built with glibc >= 2.24.90-26 needs to require it -# See https://bugzilla.redhat.com/show_bug.cgi?id=1410644 -Requires: glibc%{?_isa} >= 2.24.90-26 - -%if %{with gdbm} -# When built with this (as guarded by the BuildRequires above), require it -Requires: gdbm-libs%{?_isa} >= 1:1.13 -%endif - %if %{with rpmwheels} Requires: python-setuptools-wheel Requires: python-pip-wheel @@ -475,11 +459,6 @@ Provides: bundled(python3-setuptools) = 40.6.2 # See https://bugzilla.redhat.com/show_bug.cgi?id=1547131 Recommends: %{name}%{?_isa} = %{version}-%{release} -# For backward compatibility only, remove in F29: -Provides: system-python-libs = %{version}-%{release} -Provides: system-python-libs%{?_isa} = %{version}-%{release} -Obsoletes: system-python-libs < %{version}-%{release} - # Shall be removed in Fedora 31 Obsoletes: platform-python-libs < %{platpyver} Obsoletes: platform-python-libs-devel < %{platpyver} @@ -511,16 +490,6 @@ Provides: 2to3 = %{version}-%{release} Conflicts: %{name} < %{version}-%{release} -# https://bugzilla.redhat.com/show_bug.cgi?id=1111275 -# /usr/bin/2to3 was moved from python2-tools to python3-tools -# TODO Remove in Fedora 29 -Conflicts: python2-tools < 2.7.13-17 -Conflicts: python-tools < 2.7.13-17 -# https://bugzilla.redhat.com/show_bug.cgi?id=1312030 -# /usr/bin/2to3 was moved from python3-tools to python3-devel -# TODO Remove in Fedora 30 -Conflicts: python3-tools < 3.6.4-14 - # Shall be removed in Fedora 31 Obsoletes: platform-python-devel < %{platpyver} @@ -1002,13 +971,6 @@ ln -s \ %{buildroot}%{_bindir}/python3-debug %endif -# System Python: Link the executable to libexec -# This is for backwards compatibility only and should be removed in Fedora 29 -%if %{without flatpackage} -mkdir -p %{buildroot}%{_libexecdir} -ln -s %{_bindir}/python%{pybasever} %{buildroot}%{_libexecdir}/system-python -%endif - %if %{with flatpackage} # Remove stuff that would conflict with python3 package rm %{buildroot}%{_bindir}/python3 @@ -1121,8 +1083,6 @@ CheckPython optimized %{_bindir}/pyvenv %{_mandir}/*/* %{_bindir}/pyvenv -# Remove in Fedora 29: -%{_libexecdir}/system-python %else %{_bindir}/pydoc%{pybasever} %{_mandir}/*/python%{pybasever}*