Feat: python env and githook setup on a make install

This commit is contained in:
Bertrand Benjamin 2020-08-07 18:18:07 +02:00
parent 5f9b7f4085
commit 3da07e3c6e
3 changed files with 7 additions and 3 deletions

View File

@ -5,8 +5,10 @@ COMMON_EXCLUDE=--exclude "__pycache__" --exclude "venv/" --exclude ".git" --excl
install: install:
git config core.hooksPath ./tools/git/hooks/ git config core.hooksPath ./tools/git/hooks/
python -m venv ~/.venv/enseignements/ python -m venv ~/.venv/enseignements/
source ~/.venv/enseignements/bin/activate.fish ( \
pip install -r requirements.txt . ~/.venv/enseignements/bin/activate;\
pip install -r requirements.txt;\
)
clean: clean:
git clean -idx -e venv/ -e video/ git clean -idx -e venv/ -e video/

2
requirements.txt Normal file
View File

@ -0,0 +1,2 @@
restructuredtext-lint
gitpython

View File

@ -11,7 +11,7 @@ Git hook to ensure validity of all rst files
""" """
from git import Repo from git import Repo
from path import Path from pathlib import Path
import re import re
import time import time
import restructuredtext_lint import restructuredtext_lint