!11 python3: add generic_os support to python3

Merge pull request !11 from hanxinke/master
This commit is contained in:
openeuler-ci-bot 2020-06-01 19:31:21 +08:00 committed by Gitee
commit f19f4b94d6
2 changed files with 36 additions and 1 deletions

View File

@ -0,0 +1,24 @@
diff --git a/Lib/platform.py b/Lib/platform.py
index 6ab06b5..8d41a4b 100755
--- a/Lib/platform.py
+++ b/Lib/platform.py
@@ -297,7 +297,7 @@ _release_version = re.compile(r'([^0-9]+)'
# and http://www.die.net/doc/linux/man/man1/lsb_release.1.html
_supported_dists = (
- 'SuSE', 'debian', 'fedora', 'redhat', 'centos',
+ 'SuSE', 'debian', 'fedora', 'redhat', 'centos', 'generic_os',
'mandrake', 'mandriva', 'rocks', 'slackware', 'yellowdog', 'gentoo',
'UnitedLinux', 'turbolinux', 'arch', 'mageia')
@@ -367,6 +367,8 @@ def _linux_distribution(distname, version, id, supported_dists,
return distname, version, id
etc.sort()
for file in etc:
+ if os.path.islink(os.path.join(_UNIXCONFDIR, file)):
+ continue
m = _release_filename.match(file)
if m is not None:
_distname, dummy = m.groups()
--
2.23.0

View File

@ -3,7 +3,7 @@ Summary: Interpreter of the Python3 programming language
URL: https://www.python.org/
Version: 3.7.4
Release: 9
Release: 10
License: Python
%global branchversion 3.7
@ -106,6 +106,8 @@ Patch6001: CVE-2019-16935.patch
Patch6002: CVE-2019-17514.patch
Patch6003: CVE-2019-9674.patch
Patch9000: python3-add-generic-os-support.patch
Provides: python%{branchversion} = %{version}-%{release}
Provides: python(abi) = %{branchversion}
@ -197,6 +199,9 @@ rm Lib/ensurepip/_bundled/*.whl
%patch6002 -p1
%patch6003 -p1
%patch9000 -p1
sed -i "s/generic_os/%{_vendor}/g" Lib/platform.py
rm configure pyconfig.h.in
%build
@ -796,6 +801,12 @@ export BEP_GTDLIST="$BEP_GTDLIST_TMP"
%{_mandir}/*/*
%changelog
* Mon Jun 1 2020 hanxinke<hanxinke@huawei.com> - 3.7.4-10
- Type:bugfix
- ID:NA
- SUG:NA
- DESC:add generic_os support to python3
* Tue Apr 21 2020 hanxinke<hanxinke@huawei.com> - 3.7.4-9
- Type:cves
- ID:CVE-2019-9674