-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
69 lines (55 loc) · 1.76 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
NAME = $(shell python setup.py --name)
FULLNAME = $(shell python setup.py --fullname)
DESCRIPTION = $(shell python setup.py --description)
VERSION = $(shell python setup.py --version)
URL = $(shell python setup.py --url)
DOCS_DIR = docs
.PHONY: clean help install coverage docs doc-html doc-pdf dev-install quality release test tox
help:
@echo '$(NAME) - $(DESCRIPTION)'
@echo 'Version: $(VERSION)'
@echo 'URL: $(URL)'
@echo
@echo 'Targets:'
@echo ' help : display this help text.'
@echo ' install : install package $(NAME).'
@echo ' test : run all tests.'
@echo ' tox : run all tests with tox.'
@echo ' coverage : analyze test coverage.'
@echo ' docs : generate documentation files.'
@echo ' quality : code quality check.'
@echo ' clean : remove files created by other targets.'
install:
python setup.py install
coverage:
py.test --cov hyer --cov-report=html
dev-install:
pip install -r requirements/test.txt
pip install -r requirements/doc.txt
pip install -e .
docs: doc-html doc-pdf
doc-html: test
cd $(DOCS_DIR); $(MAKE) html
doc-pdf: test
cd $(DOCS_DIR); $(MAKE) latexpdf
release: quality coverage tox
@echo 'Checking release version, abort if attempt to release a dev version.'
echo '$(VERSION)' | grep -qv dev
@echo 'Bumping version number to $(VERSION), abort if no pending changes.'
hg commit -m 'Bumped version number to $(VERSION)'
@echo "Tagging release version $(VERSION), abort if already exists."
hg tag $(VERSION)
@echo "Uploading to PyPI."
python setup.py sdist upload --sign
@echo "Done."
test:
py.test -v
tox:
tox
quality:
pep8 hyer
pyflakes hyer
pylint hyer
clean:
cd $(DOCS_DIR) && $(MAKE) clean
rm -rf build/ dist/ htmlcov/ *.egg-info MANIFEST $(DOCS_DIR)/conf.pyc *~