Permalink
Browse files

Working on it

  • Loading branch information...
mortenvp committed May 13, 2018
1 parent 74258d0 commit 4350ef70f764863b79c33598c88a558478428a0e
Showing with 13 additions and 17 deletions.
  1. +13 −17 src/git_sphinx_build/virtualenv.py
@@ -54,29 +54,25 @@ def create_environment(self, path):
return env
@staticmethod
def from_git(git, clone_path, log):
def prompt_from_git(git, clone_path, prompt_class, log):
""" This method will construct the VirtualEvn with a command where
the virtualenv is in the path.
"""
repo_path = os.path.join(clone_path, VERSION)
repo_path = os.path.join(clone_path, VERSION)
if not os.path.isdir(repo_path):
if not os.path.isdir(repo_path):
log.debug('Cloning {} into {}'.format(URL, repo_path))
log.debug('Cloning {} into {}'.format(URL, repo_path))
git.clone(repository=URL, directory=repo_path,
cwd=clone_path)
git.clone(repository=URL, directory=repo_path,
cwd=clone_path)
git.checkout(branch=VERSION, cwd=repo_path)
git.checkout(branch=VERSION, cwd=repo_path)
log.debug('Using virtualenv from {}'.format(URL, repo_path))
log.debug('Using virtualenv from {}'.format(URL, repo_path))
env = dict(os.environ)
env.update({'PYTHONPATH': clone_path})
env = dict(os.environ)
env.update({'PYTHONPATH': clone_path})
process = prompt_class(env=env)
prompt = commandline.Prompt(env=env)
return VirtualEnv(process=process, process_factory=process_factory,
log=log)
return VirtualEnv(prompt=prompt, log=log)

0 comments on commit 4350ef7

Please sign in to comment.