install_global=false -include config.mk version := $(shell poetry version | awk '{ print $$2 }') .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 poetry build -f wheel pip3 install --upgrade --ignore-installed "dist/talermerchantdemos-$(version)-py3-none-any.whl" .PHONY: install-local install-local: compile poetry build -f wheel pip3 install --upgrade --ignore-installed --user "dist/talermerchantdemos-$(version)-py3-none-any.whl" # 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 talermerchantdemos/translations pybabel extract -F babel.cfg -o talermerchantdemos/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 talermerchantdemos/translations .PHONY: update update: extract pybabel update -i talermerchantdemos/translations/messages.pot -d talermerchantdemos/translations