Move the installer thing

This commit is contained in:
Anthony Sottile 2014-03-13 19:01:15 -07:00
parent 95d9e29996
commit 8b0247e17f
4 changed files with 7 additions and 4 deletions

View file

@ -3,8 +3,8 @@ import contextlib
from plumbum import local
from pre_commit import git
class RepoInstaller(object):
class RepoInstaller(object):
def __init__(self, git_repo_path, sha):
self.git_repo_path = git_repo_path
self.sha = sha
@ -28,6 +28,8 @@ class RepoInstaller(object):
local['git']['checkout', self.sha]()
def install(self):
# TODO: need to take in the config here and determine if we actually
# need to run any installers (and what languages to install)
with self.in_checkout():
if local.path('setup.py').exists():
local['virtualenv']['py_env']()