mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-01-03 15:30:00 -06:00
Move the installer thing
This commit is contained in:
@@ -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']()
|
||||
@@ -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):
|
||||
Reference in New Issue
Block a user