1. holger krekel
  2. tox

Commits

philip_thiem  committed 586fd3d

On win32 call pip-script.py instead of pip.
Then _cmdline would need to be patched to add the interpreter
for the py script.

  • Participants
  • Parent commits a853f62
  • Branches develop-pip-win32

Comments (0)

Files changed (2)

File tox/_cmdline.py

View file
             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):

File tox/_venv.py

View file
 
     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" %