Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(445)

Unified Diff: run.py

Issue 381043002: Add a virtualenv-based python bootstrapping service to infra. (Closed) Base URL: https://chromium.googlesource.com/infra/infra@master
Patch Set: Address comments, add warning while building on Ubuntu Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « infra/tools/buildbot/__main__.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: run.py
diff --git a/run.py b/run.py
index 9e86a314ea323b0cf52b72ceef36a920bb9ce5e4..483cf952e98b0b648ccebc9af795d5b765c85b9d 100755
--- a/run.py
+++ b/run.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!ENV/bin/python
# Copyright 2014 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
@@ -21,7 +21,17 @@ import shlex
import sys
import textwrap
-from infra.ext import argcomplete
+
+ROOT = os.path.dirname(os.path.abspath(__file__))
+
+if os.path.abspath(sys.prefix) != os.path.join(ROOT, 'ENV'):
+ print 'You must use the virtualenv in ENV for scripts in the infra repo.'
+ print 'Please run this as `./ENV/bin/python run.py`. If you do not have an'
+ print 'ENV directory, please make one with `gclient runhooks`.'
+ sys.exit(1)
+
+
+import argcomplete
def main(args):
« no previous file with comments | « infra/tools/buildbot/__main__.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698