-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
43 lines (32 loc) · 1.04 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
VIRTUALENV := virtualenv
all:
@echo "usage: make (dist|i18n|clean|virtualenv|test)"
.PHONY: all
dist: virtualenv test
"$(VIRTUALENV)"/bin/python3 setup.py sdist bdist_wheel
.PHONY: dist
upload: dist
twine upload dist/*
.PHONY: upload
i18n: unidump/locale/de/LC_MESSAGES/unidump.mo
.PHONY: i18n
unidump/locale/de/LC_MESSAGES/unidump.mo: unidump/locale/de/LC_MESSAGES/unidump.po
msgfmt -o "$@" "$<"
unidump/locale/de/LC_MESSAGES/unidump.po: unidump/locale/unidump.pot
msgmerge -U "$@" "$<"
unidump/locale/unidump.pot: unidump/cli.py
xgettext -o "$@" -LPython --from-code utf-8 "$<"
clean:
rm -fr unidump.egg-info dist build
.PHONY: clean
virtualenv: $(VIRTUALENV)/bin/python3
.PHONY: virtualenv
$(VIRTUALENV)/bin/python3: requirements.txt
virtualenv -p /usr/bin/python3 "$(VIRTUALENV)"
"$(VIRTUALENV)"/bin/pip install -r requirements.txt
test: virtualenv
"$(VIRTUALENV)"/bin/pylint unidump
"$(VIRTUALENV)"/bin/mypy unidump
"$(VIRTUALENV)"/bin/pep8 unidump
"$(VIRTUALENV)"/bin/python3 -m doctest unidump/__init__.py unidump/[a-z]*.py
.PHONY: test