Browse code

Adding Photon platform support in python

Change-Id: I1b3d89628420148d2ade91714bb42f8d75c06e64
Reviewed-on: http://photon-jenkins.eng.vmware.com:8082/1997
Tested-by: gerrit-photon <photon-checkins@vmware.com>
Reviewed-by: Alexey Makhalov <amakhalov@vmware.com>

DheerajSShetty authored on 2017/01/21 10:47:08
Showing 4 changed files
1 1
new file mode 100644
... ...
@@ -0,0 +1,12 @@
0
+diff -rupr a/Lib/platform.py b/Lib/platform.py
1
+--- a/Lib/platform.py	2015-12-05 11:47:01.000000000 -0800
2
+@@ -261,7 +261,7 @@ _release_version = re.compile(r'([^0-9]+
3
+ _supported_dists = (
4
+     'SuSE', 'debian', 'fedora', 'redhat', 'centos',
5
+     'mandrake', 'mandriva', 'rocks', 'slackware', 'yellowdog', 'gentoo',
6
+-    'UnitedLinux', 'turbolinux')
7
++    'UnitedLinux', 'turbolinux', 'photon')
8
+ 
9
+ def _parse_release_file(firstline):
10
+ 
... ...
@@ -1,7 +1,7 @@
1 1
 Summary:	A high-level scripting language
2 2
 Name:		python2
3 3
 Version:	2.7.11
4
-Release:	10%{?dist}
4
+Release:	11%{?dist}
5 5
 License:	PSF
6 6
 URL:		http://www.python.org/
7 7
 Group:		System Environment/Programming
... ...
@@ -13,6 +13,7 @@ Patch0: cgi.patch
13 13
 Patch1: added-compiler-flags-for-curses-module.patch
14 14
 Patch2: added-pyopenssl-ipaddress-certificate-validation.patch
15 15
 Patch3: python2-CVE-2016-5636.patch
16
+Patch4: python2-support-photon-platform.patch
16 17
 BuildRequires:	pkg-config >= 0.28
17 18
 BuildRequires:	bzip2-devel
18 19
 BuildRequires:  openssl-devel
... ...
@@ -103,6 +104,7 @@ to build python programs.
103 103
 %patch1 -p1
104 104
 %patch2 -p1
105 105
 %patch3 -p1
106
+%patch4 -p1
106 107
 
107 108
 %build
108 109
 export OPT="${CFLAGS}"
... ...
@@ -218,6 +220,8 @@ rm -rf %{buildroot}/*
218 218
 %{_bindir}/idle*
219 219
 
220 220
 %changelog
221
+*   Fri Jan 20 2017 Dheeraj Shetty <dheerajs@vmware.com> 2.7.11-11
222
+-   Added patch to support Photon OS
221 223
 *   Wed Nov 16 2016 Alexey Makhalov <ppadmavilasom@vmware.com> 2.7.11-10
222 224
 -   Use sqlite-{devel,libs}
223 225
 *   Thu Oct 27 2016 Anish Swaminathan <anishs@vmware.com> 2.7.11-9
224 226
new file mode 100644
... ...
@@ -0,0 +1,12 @@
0
+diff -rupr c/Lib/platform.py d/Lib/platform.py
1
+--- c/Lib/platform.py	2015-12-06 17:39:08.000000000 -0800
2
+@@ -268,7 +268,7 @@ _release_version = re.compile(r'([^0-9]+
3
+ _supported_dists = (
4
+     'SuSE', 'debian', 'fedora', 'redhat', 'centos',
5
+     'mandrake', 'mandriva', 'rocks', 'slackware', 'yellowdog', 'gentoo',
6
+-    'UnitedLinux', 'turbolinux', 'arch', 'mageia')
7
++    'UnitedLinux', 'turbolinux', 'arch', 'mageia','photon')
8
+ 
9
+ def _parse_release_file(firstline):
10
+ 
... ...
@@ -1,7 +1,7 @@
1 1
 Summary:        A high-level scripting language
2 2
 Name:           python3
3 3
 Version:        3.5.1
4
-Release:        9%{?dist}
4
+Release:        10%{?dist}
5 5
 License:        PSF
6 6
 URL:            http://www.python.org/
7 7
 Group:          System Environment/Programming
... ...
@@ -11,6 +11,7 @@ Source0:        https://www.python.org/ftp/python/%{version}/Python-%{version}.t
11 11
 %define sha1    Python=0186da436db76776196612b98bb9c2f76acfe90e
12 12
 Patch0:         cgi3.patch
13 13
 Patch1:         python3-CVE-2016-5636.patch
14
+Patch2:         python3-support-photon-platform.patch
14 15
 BuildRequires:  pkg-config >= 0.28
15 16
 BuildRequires:  bzip2-devel
16 17
 BuildRequires:  ncurses-devel
... ...
@@ -86,6 +87,7 @@ to build python programs.
86 86
 %setup -q -n Python-%{version}
87 87
 %patch0 -p1
88 88
 %patch1 -p1
89
+%patch2 -p1
89 90
 
90 91
 %build
91 92
 export OPT="${CFLAGS}"
... ...
@@ -188,6 +190,8 @@ rm -rf %{buildroot}/*
188 188
 %{_bindir}/idle*
189 189
 
190 190
 %changelog
191
+*   Fri Jan 20 2017 Dheeraj Shetty <dheerajs@vmware.com> 3.5.1-10
192
+-   Added patch to support Photon OS
191 193
 *   Tue Dec 20 2016 Xiaolin Li <xiaolinl@vmware.com> 3.5.1-9
192 194
 -   Move easy_install-3.5 to devel subpackage.
193 195
 *   Wed Nov 16 2016 Alexey Makhalov <ppadmavilasom@vmware.com> 3.5.1-8