-
Notifications
You must be signed in to change notification settings - Fork 0
/
makefile
31 lines (26 loc) · 595 Bytes
/
makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#!/bin/bash
ENV=".env"
PYTHON="python3" # python3 --> 3.6 | python2 --> 2.7
PIP="pip3" # pip3 --> python3 | pip2 --> python2
clean:
find . -name "*.pyc" -type f -delete
find . -name "__pycache__" -type d -delete
remove:
if [ -d $(ENV) ] ; then \
rm -rf $(ENV) ; \
fi ;
setup:
make remove ;
$(PIP) install virtualenv ;
virtualenv -p $(PYTHON) $(ENV) ;
source "./$(ENV)/bin/activate" && \
pip install -r requirements.txt && \
pip install pytest && \
make test ;
test:
if [ ! -d $(ENV) ]; then \
make setup ; \
fi ;
source "./$(ENV)/bin/activate" && \
pytest ;
make clean ;