forked from pythoncn/june
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
64 lines (45 loc) · 1.13 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
# Makefile for project June
.PHONY: clean-pyc clean-build docs
# Development
all:
@pip install -r etc/reqs-dev.txt
@cp etc/githooks/* .git/hooks/
@chmod -R +x .git/hooks/
server:
@python manager.py runserver
database:
@python manager.py createdb
# translate
babel-extract:
@pybabel extract -F etc/babel.cfg -o data/messages.pot .
language = zh
babel-init:
@pybabel init -i data/messages.pot -d i18n -l ${language}
babel-compile:
@pybabel compile -d i18n
babel-update: babel-extract
@pybabel update -i data/messages.pot -d i18n
# Common Task
clean: clean-build clean-pyc
@rm -fr cover/
clean-build:
@rm -fr build/
@rm -fr dist/
@rm -fr *.egg-info
clean-pyc:
@find . -name '*.pyc' -exec rm -f {} +
@find . -name '*.pyo' -exec rm -f {} +
@find . -name '*~' -exec rm -f {} +
june_files := $(shell find june -name '*.py' ! -path "*__init__.py")
test_files := $(shell find tests -name '*.py' ! -path "*__init__.py")
lint:
@flake8 ${june_files}
@flake8 ${test_files}
test:
@nosetests -s
coverage:
@rm -f .coverage
@nosetests --with-coverage --cover-package=june --cover-html
# Sphinx Documentation
docs:
@$(MAKE) -C docs html