-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
61 lines (50 loc) · 1.48 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
#! /usr/bin/make -f
NOSETESTS = nosetests3 test -v --stop
nosetests_cmd = $(NOSETESTS) ${NOSETESTS_OPTS}
.PHONY: tests
tests:
$(nosetests_cmd)
# run tests not requiring network
.PHONY: quicktests
quicktests: NOSETESTS_OPTS += --processes=4 --attr='!network'
quicktests:
$(nosetests_cmd)
coverage: NOSETESTS_OPTS += --with-coverage --cover-package=reportbug
coverage:
$(nosetests_cmd)
coverhtml: NOSETESTS_OPTS += --cover-html
coverhtml: coverage
codechecks: pep8 pyflakes pylint
pep8:
pep8 --verbose --repeat --show-source --filename=*.py,reportbug,querybts . --statistics --ignore=E501
pyflakes:
pyflakes . bin/*
pylint:
pylint --output-format=colorized bin/* reportbug/ checks/* test/ setup.py
.PHONY: i18n
i18n:
xgettext \
--language=Python \
--default-domain=reportbug \
--output-dir=po \
-o reportbug.pot \
bin/reportbug
xgettext \
--language=Python \
--default-domain=python3-reportbug \
--output-dir=po \
-o python3-reportbug.pot \
reportbug/*.py \
reportbug/ui/*.py
(for i in po/*/reportbug.*.po; do msgmerge -U $${i} po/reportbug.pot; done)
(for i in po/*/python3-reportbug.*.po; do msgmerge -U $${i} po/python3-reportbug.pot; done)
.PHONY: generate-translations
generate-translations:
(for i in po/*/reportbug.*.po; do \
_f="$$(dirname $${i})/reportbug.mo"; \
msgfmt $${i} -o $$_f; \
done)
(for i in po/*/python3-reportbug.*.po; do \
_f="$$(dirname $${i})/python3-reportbug.mo"; \
msgfmt $${i} -o $$_f; \
done)