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']()

View File

@@ -1,12 +1,13 @@
import os
import jsonschema
import pytest
import os
from plumbum import local
import pre_commit.constants as C
from pre_commit.clientlib.validate_config import CONFIG_JSON_SCHEMA
from pre_commit.installer.repo_installer import create_repo_in_env
from pre_commit.installer.repo_installer import install_pre_commit
from pre_commit.repo_installer import create_repo_in_env
from pre_commit.repo_installer import install_pre_commit
def get_sha(git_repo):