forked from nzola/opwen-webapp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
makefile
56 lines (41 loc) · 1.28 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
#
# System configuration
#
PYTHON=/usr/bin/python3
NPM=/usr/bin/npm
#
# You shouldn't need to touch anything below this line.
#
py_env=venv
py_packages=opwen_email_client
grunt=./node_modules/grunt/bin/grunt
env=./.env
app_runner=$(py_env)/bin/python ./manage.py devserver
.PHONY: default
default: server
$(py_env)/bin/activate: requirements.txt
test -d $(py_env) || $(PYTHON) -m venv $(py_env)
$(py_env)/bin/pip install -U pip wheel
$(py_env)/bin/pip install -r requirements.txt
test -f requirements-dev.txt && $(py_env)/bin/pip install -r requirements-dev.txt
venv: $(py_env)/bin/activate
unit-tests: venv
$(py_env)/bin/nosetests
tests: unit-tests
lint: venv
$(py_env)/bin/flake8 $(py_packages)
typecheck: venv
$(py_env)/bin/mypy --silent-imports $(py_packages)
ci: tests lint
$(grunt): package.json bower.json
$(NPM) install
build-js: $(grunt) Gruntfile.js
$(grunt)
babel.pot: babel.cfg venv
$(py_env)/bin/pybabel extract -F babel.cfg -k lazy_gettext -o babel.pot opwen_email_client/webapp
prepare-translations: babel.pot venv
$(py_env)/bin/pybabel init -i babel.pot -d opwen_email_client/webapp/translations -l $(LANG)
compile-translations: venv
$(py_env)/bin/pybabel compile -d opwen_email_client/webapp/translations
server: venv compile-translations build-js
$(app_runner)