Download:
child 5:eaa6df85550a
parent 3:73d07ba32f93
4:69b4a7343f90
Anton Shestakov <av6@dwimlabs.net>, Mon, 13 Jun 2016 11:10:56 +0800
checker: set up venv for linters

1 файлов изменено, 12 вставок(+), 0 удалений(-) [+]
checker.py file | annotate | diff | comparison | revisions
--- a/checker.py Mon Jun 13 11:08:16 2016 +0800
+++ b/checker.py Mon Jun 13 11:10:56 2016 +0800
@@ -77,6 +77,18 @@
if not run(['hg', 'log', '-r', '.', '-T', template], silent=True):
ok = False
+ if ok:
+ print('# C&O task: setup')
+
+ venv = '../venv'
+ print_and_run(['virtualenv', venv])
+ pip = os.path.join(venv, 'bin', 'pip')
+ for linter in config['linters']:
+ if 'pip' in linter:
+ if not run([pip, 'install'] + linter['pip']):
+ ok = False
+ break
+
print('# C&O task: cleanup')
rmtree(tmp)