-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
36 lines (30 loc) · 938 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
32
33
34
35
36
# This tries to find a python linter, defaults to the NOP if none found
# Looks for: pyflakes and flake8 (for now)
LINTER=$(shell if which flake8 > /dev/null ; \
then which flake8; \
elif which pyflakes > /dev/null ; \
then which pyflakes; \
else which true; fi )
# This tries to figure out the virtualenv setup, if already in a virtualenv, uses
# NOP, if it finds mkvirtualenv, uses that, otherwise nothing (uses the global
# environment for now)
VENV=$(shell if $VIRTUAL_ENV > /dev/null ; \
then which true; \
else if which mkvirtualenv > /dev/null ; \
then which mkvirtualenv; \
else which true;) # Need to figure out default
init:
${VENV} rpg
pip install -r requirements.txt
cp rpg/settings.py_template rpg/settings.py
unittest:
nosetests --with-color ./tests/*.py
lint:
${LINTER} ./rpg/*.py
${LINTER} ./rpg/database/*.py
test: lint unittest
clean:
rm rpg/*.pyc
rm rpg/database/*.pyc
serve:
python serve.py