-
Notifications
You must be signed in to change notification settings - Fork 49
/
Makefile
77 lines (55 loc) · 1.52 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
65
66
67
68
69
70
71
72
73
74
75
76
77
GPG := gpg
PYFLAKES := pyflakes
PYLINT := python3 -m pylint
PYPY := pypy
PYTHON := python
PYTHON3 := python3
TWINE := python3 -m twine
default: test
test:
$(PYTHON) setup.py test
check: test lint pylint tox
tox:
$(PYTHON3) -m tox
run:
PYTHONPATH=. $(PYTHON) wpm
repl:
PYTHONPATH=. $(PYTHON) -i -c \
'from wpm.stats import*; from wpm.quotes import *; from wpm.difficulty import *; quotes = Quotes.load(); stats = Stats.load(); diffs = Difficulty.load()'
profile:
PYTHONPATH=. $(PYTHON) -m cProfile -o stats wpm/__main__.py
python -c 'import pstats; p = pstats.Stats("stats"); p.sort_stats("cumulative").print_stats(10)'
help:
PYTHONPATH=. $(PYTHON) wpm --help
dump:
PYTHONPATH=. $(PYTHON) tools/dumpdiffs.py
run3:
PYTHONPATH=. $(PYTHON3) wpm
runpypy:
PYTHONPATH=. $(PYPY) wpm
stats:
@PYTHONPATH=. $(PYTHON) wpm --stats
monochrome:
@PYTHONPATH=. $(PYTHON) wpm --monochrome
remove-prefixes:
PYTHONPATH=. $(PYTHON) tools/remove-prefixes.py
dist:
rm -rf dist/*
WHEEL_TOOL=$(shell which wheel) $(PYTHON) setup.py sdist bdist_wheel
dist-sign: dist
find dist -type f -exec $(GPG) --detach-sign -a {} \;
publish: dist-sign
$(TWINE) upload dist/*
setup-pypi-test:
$(PYTHON) setup.py register -r pypitest
$(PYTHON) setup.py sdist bdist_wheel upload -r pypitest
setup-pypi-publish:
$(PYTHON) setup.py register -r pypi
$(PYTHON) setup.py sdist bdist_wheel upload --sign -r pypi
lint:
$(PYFLAKES) wpm
pylint:
$(PYLINT) --exit-zero wpm/*.py
clean:
find . -name '*.pyc' -exec rm -f {} \;
rm -rf wpm.egg-info .eggs build dist