Permalink
Browse files

Use xcrun to find momc, if available

  • Loading branch information...
1 parent 2a09a30 commit dcb35f13fa50db796e9a44190cbb71bea87b2a70 Devin Chalmers committed Feb 29, 2012
Showing with 8 additions and 2 deletions.
  1. +8 −2 emogenerator/emogenerator.py
@@ -76,7 +76,13 @@ def store_open_file(option, opt_str, value, parser, *args, **kwargs):
# theResult, thePath = commands.getstatusoutput('which momc')
# if theResult == 0:
# theDefaultMomcPath = thePath
-
+
+ # Ask xcrun where momc is
+ if not theDefaultMomcPath:
+ theResult, thePath = commands.getstatusoutput('xcrun -find momc')
+ if theResult == 0:
+ theDefaultMomcPath = thePath
+
# If still no momc then look in the known places.
if not theDefaultMomcPath:
theMomPaths = [
@@ -91,7 +97,7 @@ def store_open_file(option, opt_str, value, parser, *args, **kwargs):
theDefaultMomcPath = thePath
break
logger.info('... not Found!')
-
+
if not theDefaultMomcPath:
raise Exception('Could not find momc file')

0 comments on commit dcb35f1

Please sign in to comment.