devinabox: Make running build_cpython.py even easier by using more heuristics to guess

http://hg.python.org/devinabox/rev/32c1302a9242 changeset: 59:32c1302a9242 user: Brett Cannon <brett@python.org> date: Fri Nov 29 15:06:28 2013 -0500 summary: Make running build_cpython.py even easier by using more heuristics to guess where the CPython checkout is. files: build_cpython.py | 8 +++++++- 1 files changed, 7 insertions(+), 1 deletions(-) diff --git a/build_cpython.py b/build_cpython.py --- a/build_cpython.py +++ b/build_cpython.py @@ -58,7 +58,13 @@ 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: -- Repository URL: http://hg.python.org/devinabox
participants (1)
-
brett.cannon