diff options
author | Shanto <shanto@hotmail.com> | 2011-10-16 13:02:01 +0400 |
---|---|---|
committer | Shanto <shanto@hotmail.com> | 2011-10-16 13:02:01 +0400 |
commit | 04eb477cccc8237689ec3dfbe22d994de7038666 (patch) | |
tree | 06d9f2d73a3bf24fb26a3a2bf9becad8afb656bd /extras/PyBinding | |
parent | b6bdf024e4170f241ccd3e5a3649ad1f58cf73d4 (diff) |
Consider Python 2.7 as preferred Python/Runtime. Possible fix to many issues on Arch Linux where the Python 2.x executable is /usr/bin/python2 (also python2.7).
Diffstat (limited to 'extras/PyBinding')
-rw-r--r-- | extras/PyBinding/PyBinding/PyBinding/PythonHelper.cs | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/extras/PyBinding/PyBinding/PyBinding/PythonHelper.cs b/extras/PyBinding/PyBinding/PyBinding/PythonHelper.cs index a797280d16..194755229c 100644 --- a/extras/PyBinding/PyBinding/PyBinding/PythonHelper.cs +++ b/extras/PyBinding/PyBinding/PyBinding/PythonHelper.cs @@ -109,6 +109,13 @@ namespace PyBinding // next preferred type. try { + return new Python27Runtime () { + Path = Which ("python2.7") + }; + } + catch {} + + try { return new Python26Runtime () { Path = Which ("python2.6") }; @@ -129,8 +136,10 @@ namespace PyBinding public static string FindPreferredPython () { + try { return Which ("python2.7"); } catch {} try { return Which ("python2.6"); } catch {} try { return Which ("python2.5"); } catch {} + try { return Which ("python2"); } catch {} try { return Which ("python"); } catch {} throw new FileNotFoundException ("Could not locate python executable"); |