forked from bnomis/ab2cb
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
69 lines (49 loc) · 1.02 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
PEP := pep8
PYFLAKES := pyflakes
FLAKE8 := flake8
RM := rm -rf
src := ab2cb/*.py tests/*.py *.py
PANDOC := pandoc
RST2HTML := rst2html-2.7.py
PYTHON := python
CHMOD := chmod -R
TWINE := twine
.PHONY: dev sdist wheel docs rst html
wheel:
$(PYTHON) setup.py bdist_wheel
sdist:
$(PYTHON) setup.py sdist
twine: sdist wheel
$(TWINE) upload dist/*
docs: rst html
rst: docs/README.rst
html: docs/README.html
docs/README.rst: README.md
-@ mkdir docs
$(PANDOC) -f markdown -t rst -o $@ $<
docs/README.html: docs/README.rst
-@ mkdir docs
$(RST2HTML) $< $@
register: rst
$(PYTHON) setup.py register
pep8:
-@ $(PEP) $(src)
pyflakes:
-@ $(PYFLAKES) $(src)
flake8:
-@ $(FLAKE8) $(src)
# will fail if dev is not on the path
# source bin/activate.sh first
dev:
-@ mkdir dev
@ python setup.py develop -d dev
test:
@ tox
coverage:
@ tox -c tox-coverage.ini
coverclean:
@ $(RM) .coverage htmlcov
devclean:
@ $(RM) dev
clean: coverclean devclean
@ $(RM) pip-install.log .tox debug.log debug.log.* dist *.egg-info tests-out docs