Skip to content

Commit

Permalink
default TauDEM/MPI paths for OS X
Browse files Browse the repository at this point in the history
  • Loading branch information
kyngchaos committed Apr 20, 2013
1 parent 261dfbf commit 0ca725c
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions python/plugins/sextante/taudem/TauDEMUtils.py
Expand Up @@ -43,6 +43,14 @@ def taudemPath():
if folder == None:
folder = ""

if SextanteUtils.isMac():
testfolder = os.path.join(str(QgsApplication.prefixPath()), "bin")
if os.path.exists(os.path.join(testfolder, "slopearea")):
folder = testfolder
else:
testfolder = "/usr/local/bin"
if os.path.exists(os.path.join(testfolder, "slopearea")):
folder = testfolder
return folder

@staticmethod
Expand All @@ -51,6 +59,14 @@ def mpiexecPath():
if folder == None:
folder = ""

if SextanteUtils.isMac():
testfolder = os.path.join(str(QgsApplication.prefixPath()), "bin")
if os.path.exists(os.path.join(testfolder, "mpiexec")):
folder = testfolder
else:
testfolder = "/usr/local/bin"
if os.path.exists(os.path.join(testfolder, "mpiexec")):
folder = testfolder
return folder

@staticmethod
Expand Down

0 comments on commit 0ca725c

Please sign in to comment.