-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
90 lines (60 loc) · 1.52 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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
PY_VERSION := python3
PIP := env/bin/pip
PY := env/bin/python
FLAKE8 := env/bin/flake8
MYPY := env/bin/mypy
PYDOCSTYLE := env/bin/pydocstyle
COVERAGE := env/bin/coverage
help:
@echo "COMMANDS:"
@echo " clean Remove all generated files."
@echo " setup Setup development environment."
@echo " shell Open ipython from the development environment."
@echo " test Run tests."
@echo " run Start development server"
@echo " celery Start celery"
@echo " locales_collect Collect all translation"
@echo " locales_compile Compile all translation"
@echo ""
clean:
rm -rf env
rm -rf build
rm -rf dist
rm -rf *.egg
rm -rf *.egg-info
find | grep -i ".*\.pyc$$" | xargs -r -L1 rm
virtualenv: clean
$(PY_VERSION) -m venv env
setup: virtualenv
$(PIP) install -e .
$(PIP) install -e .[dev]
shell:
@( \
. env/bin/activate; \
python manage.py shell_plus; \
)
run:
@( \
. env/bin/activate; \
python manage.py runserver_plus; \
)
celery:
@( \
. env/bin/activate; \
$(PY) manage.py celery app.celery \
)
lint:
-$(FLAKE8) trionyx
-$(PYDOCSTYLE) trionyx
-$(FLAKE8) tests
-$(MYPY)
test: lint
$(COVERAGE) run manage.py test tests
locales_update:
@( \
. env/bin/activate; \
$(PY) manage.py makemessages -l 'en_US' -i 'env/*' --no-obsolete; \
$(PY) manage.py makemessages -l 'nl_NL' -i 'env/*' --no-obsolete; \
)
locales_compile:
@(. env/bin/activate; $(PY) manage.py compilemessages -l en_US -l nl_NL)