Skip to content

Commit

Permalink
Make running build_cpython.py even easier by using more heuristics to…
Browse files Browse the repository at this point in the history
… guess where the CPython checkout is.
  • Loading branch information
brettcannon committed Nov 29, 2013
1 parent 16756de commit 10fc450
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion build_cpython.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,13 @@ def main(directory):
if arg_count > 1:
raise ValueError(
'0 or 1 arguments expected, not {}'.format(arg_count))
executable = main(sys.argv[1] if arg_count else 'cpython')
elif arg_count == 1:
directory = sys.argv[1]
elif os.path.exists('cpython'):
directory = 'cpython'
else:
directory = '.'
executable = main(directory)
if not executable:
print('CPython executable NOT found')
else:
Expand Down

0 comments on commit 10fc450

Please sign in to comment.