forked from learningequality/kolibri
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
87 lines (67 loc) · 2.55 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
.PHONY: help clean clean-pyc clean-build list test test-all coverage docs release sdist
help:
@echo "clean-build - remove build artifacts"
@echo "clean-pyc - remove Python file artifacts"
@echo "lint - check style with flake8"
@echo "test - run tests quickly with the default Python"
@echo "testall - run tests on every Python version with tox"
@echo "coverage - check code coverage quickly with the default Python"
@echo "docs - generate Sphinx HTML documentation, including API docs"
@echo "release - package and upload a release"
@echo "sdist - package"
clean: clean-build clean-pyc clean-docs
clean-build:
rm -fr build/
rm -fr dist/
rm -fr dist-packages-cache/
rm -fr dist-packages-temp/
rm -fr *.egg-info
rm -fr .eggs
rm -fr .cache
git clean -X -d -f kolibri/dist
clean-pyc:
find . -name '*.pyc' -exec rm -f {} +
find . -name '*.pyo' -exec rm -f {} +
find . -name '*~' -exec rm -f {} +
clean-docs:
rm -f docs/py_modules/kolibri*rst
rm -f docs/py_modules/modules.rst
rm -f docs/kolibri*rst # old location
rm -f docs/modules.rst # old location
$(MAKE) -C docs clean
lint:
flake8 kolibri
test:
python setup.py test
test-all:
tox
assets: staticdeps
npm run build
coverage:
coverage run --source kolibri setup.py test
coverage report -m
docs: clean-docs
sphinx-apidoc -d 10 -H "Python Reference" -o docs/py_modules/ kolibri kolibri/test kolibri/deployment/ kolibri/dist/
$(MAKE) -C docs html
release: clean assets
python setup.py sdist upload
python setup.py bdist_wheel upload
staticdeps: clean
DISABLE_SQLALCHEMY_CEXT=1 pip install -t kolibri/dist/ -r requirements.txt
dist: staticdeps assets compilemessages
pip install -r requirements/build.txt
python setup.py sdist --format=gztar,zip --static > /dev/null # silence the sdist output! Too noisy!
python setup.py bdist_wheel --static
pex . --disable-cache -o dist/`python setup.py --fullname`.pex -m kolibri --python-shebang=/usr/bin/python
ls -l dist
makemessages: assets
python -m kolibri manage makemessages -- -l en --ignore 'node_modules/*' --ignore 'kolibri/dist/*' --ignore 'docs/conf.py'
compilemessages:
python -m kolibri manage compilemessages -- -l en > /dev/null
syncmessages: ensurecrowdinclient uploadmessages downloadmessages
ensurecrowdinclient:
ls -l crowdin-cli.jar || wget https://crowdin.com/downloads/crowdin-cli.jar # make sure we have the official crowdin cli client
uploadmessages:
java -jar crowdin-cli.jar upload sources -b `git symbolic-ref HEAD | xargs basename`
downloadmessages:
java -jar crowdin-cli.jar download -b `git symbolic-ref HEAD | xargs basename`