Skip to content

Commit

Permalink
Refix virtualenv calling - use python -m virtualenv instead.
Browse files Browse the repository at this point in the history
  • Loading branch information
ionelmc committed Mar 25, 2014
1 parent 8f4ee8c commit 8104ca2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
2 changes: 1 addition & 1 deletion tests/test_venv.py
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,7 @@ def test_install_python3(tmpdir, newmocksession):
l = mocksession._pcalls
assert len(l) == 1
args = l[0].args
assert str(args[1]).endswith('virtualenv.py')
assert str(args[1]).endswith('virtualenv')
l[:] = []
action = mocksession.newaction(venv, "hello")
venv._install(["hello"], action=action)
Expand Down
7 changes: 1 addition & 6 deletions tox/_venv.py
Original file line number Diff line number Diff line change
Expand Up @@ -178,13 +178,8 @@ def create(self, action=None):
if action is None:
action = self.session.newaction(self, "create")

interpreters = self.envconfig.config.interpreters
config_interpreter = self.getsupportedinterpreter()
info = interpreters.get_info(executable=config_interpreter)
f, path, _ = py.std.imp.find_module("virtualenv")
f.close()
venvscript = path.rstrip("co")
args = [config_interpreter, str(venvscript)]
args = [sys.executable, '-mvirtualenv']
if self.envconfig.distribute:
args.append("--distribute")
else:
Expand Down

0 comments on commit 8104ca2

Please sign in to comment.