Index: recipes.py |
diff --git a/recipes.py b/recipes.py |
index 2d59293e4f203d2ac00bbe25b9fcf792c8dddea3..f0173ecf68d9cacc1e90d4dc6e25f361f2f9e441 100755 |
--- a/recipes.py |
+++ b/recipes.py |
@@ -218,6 +218,7 @@ def info(args): |
def main(): |
+ sysargs = sys.argv |
Paweł Hajdan Jr.
2016/06/15 10:56:19
What's the intention of this code?
It doesn't see
martiniss
2016/06/15 20:36:53
I moved this to where we mutate sys.argv, and made
|
from recipe_engine import package |
# Super-annoyingly, we need to manually parse for simulation_test since |
@@ -249,6 +250,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 +381,16 @@ def main(): |
args = parser.parse_args() |
+ if args.use_bootstrap: |
+ subprocess.check_call( |
+ ['bootstrap/bootstrap.py', '--deps-file', 'bootstrap/deps.pyl', 'ENV'], |
Paweł Hajdan Jr.
2016/06/15 10:56:19
nit: Start with sys.executable .
martiniss
2016/06/15 20:36:53
Done.
|
+ cwd=os.path.dirname(os.path.realpath(__file__))) |
+ |
+ args = [arg for arg in sysargs[1:] if 'use-bootstrap' not in arg] |
Paweł Hajdan Jr.
2016/06/15 10:56:19
nit: This might interfere with other legitimate ar
martiniss
2016/06/15 20:36:53
I used an environment variable, like update script
|
+ return subprocess.call( |
+ ['ENV/bin/python', 'recipes.py'] + args, |
+ cwd=os.path.dirname(os.path.realpath(__file__))) |
+ |
if args.verbose: |
logging.getLogger().setLevel(logging.INFO) |