You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@slider.apache.org by el...@apache.org on 2014/11/22 23:04:54 UTC

[23/50] incubator-slider git commit: SLIDER-634. slider wrapper should look for and use python version greater than or equal to 2.6 (Yu Liu via smohanty)

SLIDER-634. slider wrapper should look for and use python version greater than or equal to 2.6 (Yu Liu via smohanty)


Project: http://git-wip-us.apache.org/repos/asf/incubator-slider/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-slider/commit/a26840e3
Tree: http://git-wip-us.apache.org/repos/asf/incubator-slider/tree/a26840e3
Diff: http://git-wip-us.apache.org/repos/asf/incubator-slider/diff/a26840e3

Branch: refs/heads/master
Commit: a26840e3e73f12e40a8d6c468b60932f654c160d
Parents: 5591b72
Author: Sumit Mohanty <sm...@hortonworks.com>
Authored: Mon Nov 10 19:47:53 2014 -0800
Committer: Sumit Mohanty <sm...@hortonworks.com>
Committed: Mon Nov 10 22:47:10 2014 -0800

----------------------------------------------------------------------
 slider-assembly/src/main/scripts/slider | 14 ++++++++++++--
 1 file changed, 12 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/a26840e3/slider-assembly/src/main/scripts/slider
----------------------------------------------------------------------
diff --git a/slider-assembly/src/main/scripts/slider b/slider-assembly/src/main/scripts/slider
index 9646694..97dabaf 100755
--- a/slider-assembly/src/main/scripts/slider
+++ b/slider-assembly/src/main/scripts/slider
@@ -23,11 +23,21 @@ import os
 import sys
 import subprocess
 
-ON_POSIX = 'posix' in sys.builtin_module_names
+pyExecPath = None
+
+if os.path.isfile('/usr/bin/python2.7') and (pyExecPath is None):
+  pyExecPath = '/usr/bin/python2.7'
+if os.path.isfile('/usr/bin/python2.6') and (pyExecPath is None):
+  pyExecPath = '/usr/bin/python2.6'
+if os.path.isfile('/usr/bin/python') and (pyExecPath is None):
+  pyExecPath = '/usr/bin/python'
+if pyExecPath is None:
+  pyExecPath = 'python'
 
+ON_POSIX = 'posix' in sys.builtin_module_names
 currDir = os.path.dirname(os.path.realpath(__file__))
 args = sys.argv[1:]
-cmd = [currDir + "/slider.py"]
+cmd = [pyExecPath + " " + currDir + "/slider.py"]
 cmd.extend(args)
 finalCmd = " ".join(cmd)