From 2d2780a4e930d665119d11bcfb2efcf756900d22 Mon Sep 17 00:00:00 2001 From: chengquan Date: Sat, 29 Feb 2020 11:32:59 +0800 Subject: [PATCH 1/2] change default version from python2 to python3 --- python3.spec | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/python3.spec b/python3.spec index 744a950..28b78b9 100644 --- a/python3.spec +++ b/python3.spec @@ -105,6 +105,7 @@ Patch6000: CVE-2019-16056.patch Patch6001: CVE-2019-16935.patch Patch6002: CVE-2019-17514.patch +Provides: python = %{version}-%{release} Provides: python%{branchversion} = %{version}-%{release} Provides: python(abi) = %{branchversion} @@ -117,6 +118,7 @@ Provides: python3-libs Obsoletes: python3-libs Provides: python3-enum34 = 1.0.4-5 Obsoletes: python3-enum34 < 1.0.4-5 +%{?python_provide:%python_provide python3-libs} Recommends: python3-setuptools Recommends: python3-pip @@ -147,6 +149,8 @@ Provides: 2to3 = %{version}-%{release} Conflicts: %{name} < %{version}-%{release} Provides: python3-idle Obsoletes: python3-idle +Provides: idle3 = %{version}-%{release} +Provides: idle = %{version}-%{release} Provides: python3-test Obsoletes: python3-test Provides: python3-tkinter @@ -154,6 +158,12 @@ Obsoletes: python3-tkinter Provides: %{name}-tools = %{version}-%{release} Obsoletes: %{name}-tools < %{version}-%{release} +%{?python_provide:%python_provide python3-devel} +%{?python_provide:%python_provide python3-idle} +%{?python_provide:%python_provide python3-tkinter} +%{?python_provide:%python_provide python3-test} +Conflicts: python-devel < 3 + %description devel This package contains the header files and configuration needed to develop python3 modules. @@ -164,6 +174,9 @@ Summary: Debug version of the Python runtime Requires: %{name} = %{version}-%{release} Requires: %{name}-devel = %{version}-%{release} +Conflicts: python-debug < 3 +%{?python_provide:%python_provide python3-debug} + %description 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 @@ -371,6 +384,17 @@ ln -s \ mv %{buildroot}%{_bindir}/2to3-%{branchversion} %{buildroot}%{_bindir}/2to3 +ln -s ./python3 %{buildroot}%{_bindir}/python +ln -s ./pydoc3 %{buildroot}%{_bindir}/pydoc +ln -s ./pygettext3.py %{buildroot}%{_bindir}/pygettext.py +ln -s ./msgfmt3.py %{buildroot}%{_bindir}/msgfmt.py +ln -s ./idle3 %{buildroot}%{_bindir}/idle +ln -s ./python3-config %{buildroot}%{_bindir}/python-config +ln -s ./python3.1 %{buildroot}%{_mandir}/man1/python.1 +ln -s ./python3.pc %{buildroot}%{_libdir}/pkgconfig/python.pc +%if %{with debug_build} +ln -s ./python3-debug %{buildroot}%{_bindir}/python-debug + %check topdir=$(pwd) @@ -415,6 +439,7 @@ export BEP_GTDLIST="$BEP_GTDLIST_TMP" %{_bindir}/pydoc* %{_bindir}/python3 %{_bindir}/pyvenv +%{_bindir}/python %{_bindir}/python%{branchversion} %{_bindir}/python%{branchversion}m @@ -636,6 +661,10 @@ export BEP_GTDLIST="$BEP_GTDLIST_TMP" %{_bindir}/pathfix.py %{_bindir}/pygettext3.py %{_bindir}/msgfmt3.py +%{_bindir}/python-config +%{_libdir}/pkgconfig/python.pc +%{_bindir}/pygettext.py +%{_bindir}/msgfmt.py %{_bindir}/pygettext%{branchversion}.py %{_bindir}/msgfmt%{branchversion}.py @@ -697,6 +726,7 @@ export BEP_GTDLIST="$BEP_GTDLIST_TMP" %files debug %{_bindir}/python3-debug +%{_bindir}/python-debug %{_bindir}/python%{LDVERSION_debug} @@ -790,6 +820,12 @@ export BEP_GTDLIST="$BEP_GTDLIST_TMP" %{_mandir}/*/* %changelog +* Sat Feb 29 2020 chengquan - 3.7.4-8 +- Type:enhancement +- ID:NA +- SUG:NA +- DESC:change default version from python2 to python3 + * Sat Feb 22 2020 openEuler Buildteam - 3.7.4-7 - Type:enhancement - ID:NA -- Gitee From 959a7cd2183bf6337104ed0f6058db8251e3a733 Mon Sep 17 00:00:00 2001 From: chengquan Date: Sat, 29 Feb 2020 18:52:55 +0800 Subject: [PATCH 2/2] change default version from python2 to python3 --- python3.spec | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/python3.spec b/python3.spec index 28b78b9..4e64830 100644 --- a/python3.spec +++ b/python3.spec @@ -112,6 +112,9 @@ Provides: python(abi) = %{branchversion} Provides: python%{pyshortver} = %{version}-%{release} Obsoletes: python%{pyshortver} +Obsoletes: python-unversioned-command < %{version}-%{release} +Provides: python-unversioned-command = %{version}-%{release} + Requires: python-setuptools-wheel Requires: python-pip-wheel Provides: python3-libs @@ -392,7 +395,6 @@ ln -s ./idle3 %{buildroot}%{_bindir}/idle ln -s ./python3-config %{buildroot}%{_bindir}/python-config ln -s ./python3.1 %{buildroot}%{_mandir}/man1/python.1 ln -s ./python3.pc %{buildroot}%{_libdir}/pkgconfig/python.pc -%if %{with debug_build} ln -s ./python3-debug %{buildroot}%{_bindir}/python-debug %check -- Gitee