You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@slider.apache.org by st...@apache.org on 2014/11/11 11:53:24 UTC
[09/10] 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/68263b4e
Tree: http://git-wip-us.apache.org/repos/asf/incubator-slider/tree/68263b4e
Diff: http://git-wip-us.apache.org/repos/asf/incubator-slider/diff/68263b4e
Branch: refs/heads/feature/SLIDER-622-windows
Commit: 68263b4edccc635ec30b1d3aa6ba3f66e17e4c60
Parents: fbd7249
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 19:48:00 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/68263b4e/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)