Search the full path
parent
6de282f4b7
commit
81c1b8a5e6
|
@ -7,20 +7,20 @@ from skeinforge_application.skeinforge_utilities import skeinforge_craft
|
||||||
def getPyPyExe():
|
def getPyPyExe():
|
||||||
"Return the path to the pypy executable if we can find it. Else return False"
|
"Return the path to the pypy executable if we can find it. Else return False"
|
||||||
if platform.system() == "Windows":
|
if platform.system() == "Windows":
|
||||||
|
exeName = "pypy.exe"
|
||||||
pypyExe = os.path.normpath(os.path.join(os.path.dirname(os.path.abspath(__file__)), "../../pypy/pypy.exe"));
|
pypyExe = os.path.normpath(os.path.join(os.path.dirname(os.path.abspath(__file__)), "../../pypy/pypy.exe"));
|
||||||
else:
|
else:
|
||||||
|
exeName = "pypy"
|
||||||
pypyExe = os.path.normpath(os.path.join(os.path.dirname(os.path.abspath(__file__)), "../../pypy/bin/pypy"));
|
pypyExe = os.path.normpath(os.path.join(os.path.dirname(os.path.abspath(__file__)), "../../pypy/bin/pypy"));
|
||||||
if os.path.exists(pypyExe):
|
if os.path.exists(pypyExe):
|
||||||
return pypyExe
|
return pypyExe
|
||||||
pypyExe = "/bin/pypy";
|
|
||||||
if os.path.exists(pypyExe):
|
path = os.environ['PATH']
|
||||||
return pypyExe
|
paths = path.split(os.pathsep)
|
||||||
pypyExe = "/usr/bin/pypy";
|
for p in paths:
|
||||||
if os.path.exists(pypyExe):
|
pypyExe = os.path.join(p, exeName)
|
||||||
return pypyExe
|
if os.path.exists(pypyExe):
|
||||||
pypyExe = "/usr/local/bin/pypy";
|
return pypyExe
|
||||||
if os.path.exists(pypyExe):
|
|
||||||
return pypyExe
|
|
||||||
return False
|
return False
|
||||||
|
|
||||||
def runSkein(fileNames):
|
def runSkein(fileNames):
|
||||||
|
|
Loading…
Reference in New Issue