| Index: recipes.py
|
| diff --git a/recipes.py b/recipes.py
|
| index 2d59293e4f203d2ac00bbe25b9fcf792c8dddea3..6061617d6074ccf1b848d52c903c763560403c31 100755
|
| --- a/recipes.py
|
| +++ b/recipes.py
|
| @@ -222,6 +222,8 @@ def main():
|
|
|
| # Super-annoyingly, we need to manually parse for simulation_test since
|
| # argparse is bonkers and doesn't allow us to forward --help to subcommands.
|
| + # Save old_args for if we're using bootstrap
|
| + original_sys_argv = sys.argv[:]
|
| if 'simulation_test' in sys.argv:
|
| index = sys.argv.index('simulation_test')
|
| sys.argv = sys.argv[:index+1] + [json.dumps(sys.argv[index+1:])]
|
| @@ -249,6 +251,10 @@ def main():
|
| parser.add_argument('-O', '--project-override', metavar='ID=PATH',
|
| action=ProjectOverrideAction,
|
| help='Override a project repository path with a local one.')
|
| + parser.add_argument(
|
| + '--use-bootstrap', action='store_true',
|
| + help='Use bootstrap/bootstrap.py to create a isolated python virtualenv'
|
| + ' with required python dependencies.')
|
|
|
| subp = parser.add_subparsers()
|
|
|
| @@ -376,6 +382,18 @@ def main():
|
|
|
| args = parser.parse_args()
|
|
|
| + if args.use_bootstrap and not os.environ.pop('RECIPES_RUN_BOOTSTRAP', None):
|
| + subprocess.check_call(
|
| + [sys.executable, 'bootstrap/bootstrap.py', '--deps-file',
|
| + 'bootstrap/deps.pyl', 'ENV'],
|
| + cwd=os.path.dirname(os.path.realpath(__file__)))
|
| +
|
| + os.environ['RECIPES_RUN_BOOTSTRAP'] = '1'
|
| + args = sys.argv
|
| + return subprocess.call(
|
| + ['ENV/bin/python'] + original_sys_argv,
|
| + cwd=os.path.dirname(os.path.realpath(__file__)))
|
| +
|
| if args.verbose:
|
| logging.getLogger().setLevel(logging.INFO)
|
|
|
|
|