Skip to content

Commit

Permalink
Merge pull request #313 from PyAr/find-win-pip
Browse files Browse the repository at this point in the history
Check for pip.exe beyond the normal pip binary.
  • Loading branch information
gilgamezh committed Apr 22, 2018
2 parents fb5af7a + c76d874 commit c096c14
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions fades/envbuilder.py
Expand Up @@ -106,11 +106,14 @@ def create_env(self, interpreter, is_current, options):
logger.debug("Creating virtualenv with virtualenv")
self.create_with_virtualenv(interpreter, virtualenv_options)
logger.debug("env_bin_path: %s", self.env_bin_path)
# Re check if pip was installed.
pip_exe = os.path.join(self.env_bin_path, "pip")
if not os.path.exists(pip_exe):

# Re check if pip was installed (supporting both binary and .exe for Windows)
pip_bin = os.path.join(self.env_bin_path, "pip")
pip_exe = os.path.join(self.env_bin_path, "pip.exe")
if not (os.path.exists(pip_bin) or os.path.exists(pip_exe)):
logger.debug("pip isn't installed in the venv, setting pip_installed=False")
self.pip_installed = False

return self.env_path, self.env_bin_path, self.pip_installed

def post_setup(self, context):
Expand Down

0 comments on commit c096c14

Please sign in to comment.