diff options
| author | Philip Thiem <ptthiem@gmail.com> | 2013-02-19 19:15:36 -0600 |
|---|---|---|
| committer | Philip Thiem <ptthiem@gmail.com> | 2013-02-19 19:15:36 -0600 |
| commit | deb556ff9614a0198cb9a9bff45f0652b718a1c0 (patch) | |
| tree | 757bf156c31278aa9e3f7596600859b5141b9115 | |
| parent | cc213584be1bb95b35a4f95d9e64fd7b0c831bfe (diff) | |
| download | tox-deb556ff9614a0198cb9a9bff45f0652b718a1c0.tar.gz | |
On win32 call pip-script.py instead of pip.
Then _cmdline would need to be patched to add the interpreter
for the py script.
| -rw-r--r-- | tox/_cmdline.py | 8 | ||||
| -rw-r--r-- | tox/_venv.py | 2 |
2 files changed, 10 insertions, 0 deletions
diff --git a/tox/_cmdline.py b/tox/_cmdline.py index ca19212..e34d84f 100644 --- a/tox/_cmdline.py +++ b/tox/_cmdline.py @@ -120,6 +120,14 @@ class Action(object): if sys.platform != "win32" and isinstance(arg, py.path.local): arg = cwd.bestrelpath(arg) newargs.append(str(arg)) + + #subprocess does not always take kindly to .py scripts + #so adding the interpreter here. + if sys.platform == "win32": + ext = os.path.splitext(str(newargs[0]))[1].lower() + if ext == '.py' and self.venv: + newargs = [str(self.venv.getcommandpath())] + newargs + return newargs def _popen(self, args, cwd, stdout, stderr, env=None): diff --git a/tox/_venv.py b/tox/_venv.py index 5a752eb..192e868 100644 --- a/tox/_venv.py +++ b/tox/_venv.py @@ -211,6 +211,8 @@ class VirtualEnv(object): def pip_install(self, args, indexserver=None, action=None): argv = ["pip", "install"] + self._commoninstallopts(indexserver) + if sys.platform == "win32": + argv[0] = "pip-script.py" if self.envconfig.downloadcache: self.envconfig.downloadcache.ensure(dir=1) argv.append("--download-cache=%s" % |
