| 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()
|
|
|