blob: 45fe38169e60d72952641dfc293174579b30403c (
plain)
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
|
install_global=false
-include config.mk
.PHONY: all
all:
@echo "This is a python project, no compilation required"
@echo "Installation: make install"
.PHONY: install
ifeq ($(install_global), true)
install: install-global
else
install: install-local
endif
.PHONY: install-global
install-global: compile
pip3 install .
.PHONY: install-local
install-local: compile
pip3 install . --user
# run testcases
.PHONY: check
check:
@export TALER_CONFIG_FILE=talerblog/tests.conf; \
python3 setup.py test
.PHONY: clean
clean:
@echo nothing to do
.PHONY: dist
dist:
git archive --format=tar.gz HEAD -o taler-merchant-blog.tar.gz
.PHONY: pretty
pretty:
black talermerchantdemos
# i18n
extract:
# Note: Flask-BabelEx expects 'translations/' for the dirname,
# even though GNU gettext typically uses 'locale/'
mkdir -p translations/
pybabel extract -F babel.cfg -o translations/messages.pot .
# Add new language as follows:
# pybabel init -i locale/messages.pot -d locale/ -l de
.PHONY: compile
compile: update
pybabel compile -d translations/
.PHONY: update
update: extract
pybabel update -i translations/messages.pot -d translations/
|