-
Notifications
You must be signed in to change notification settings - Fork 72
/
Makefile
64 lines (45 loc) · 1.08 KB
/
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
#
# Project 4: Brevet calculator
#
# Gnu make and bash are required.
#
# Many recipes need to be run in the virtual environment,
# so run them as $(INVENV) command
INVENV = . env/bin/activate ;
##
## Virtual environment
##
env:
python3 -m venv env
($(INVENV) pip install -r requirements.txt )
## Installation
install: env credentials
credentials: brevets/credentials.ini
brevets/credentials.ini:
echo "You must manually create credentials.ini"
##
## Start, stop, test
##
start: env credentials
bash start.sh
stop: env credentials
bash stop.sh
test: env
($(INVENV) cd brevets; nosetests)
##
## Preserve virtual environment for git repository
## to duplicate it on other targets
##
dist: env
$(INVENV) pip freeze >requirements.txt
# 'clean' and 'veryclean' are typically used before checking
# things into git. 'clean' should leave the project ready to
# run, while 'veryclean' may leave project in a state that
# requires re-running installation and configuration steps
#
clean:
rm -f *.pyc */*.pyc
rm -rf __pycache__ */__pycache__
veryclean:
make clean
rm -rf env