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

Unified Diff: vpython/venv/venv.go

Issue 2905943002: [vpython] Incorporate interpreter path/hash. (Closed)
Patch Set: Created 3 years, 7 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 | « vpython/venv/config.go ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: vpython/venv/venv.go
diff --git a/vpython/venv/venv.go b/vpython/venv/venv.go
index 8510bf2e4b8e9682a0810b86ba87a0b9cb9a99e3..34908cb520d95d6e72d952f775a5318722239902 100644
--- a/vpython/venv/venv.go
+++ b/vpython/venv/venv.go
@@ -516,13 +516,25 @@ func (e *Env) installVirtualEnv(c context.Context, pkgDir string) error {
if len(matches) == 0 {
return errors.Reason("no 'virtualenv-' directory provided by package").Err()
}
+ venvDir := matches[0]
logging.Debugf(c, "Creating VirtualEnv at: %s", e.Root)
cmd := e.Config.systemInterpreter().IsolatedCommand(c,
"virtualenv.py",
"--no-download",
e.Root)
- cmd.Dir = matches[0]
+ cmd.Dir = venvDir
+ attachOutputForLogging(c, logging.Debug, cmd)
+ if err := cmd.Run(); err != nil {
+ return errors.Annotate(err).Reason("failed to create VirtualEnv").Err()
+ }
+
+ logging.Debugf(c, "Making VirtualEnv relocatable at: %s", e.Root)
+ cmd = e.Interpreter().IsolatedCommand(c,
+ "virtualenv.py",
+ "--relocatable",
+ e.Root)
+ cmd.Dir = venvDir
attachOutputForLogging(c, logging.Debug, cmd)
if err := cmd.Run(); err != nil {
return errors.Annotate(err).Reason("failed to create VirtualEnv").Err()
« no previous file with comments | « vpython/venv/config.go ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698