-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile
61 lines (48 loc) · 1.58 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
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 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 ' docs : generate documentation files.'
@echo ' quality : code quality check.'
@echo ' clean : remove files created by other targets.'
install:
pip install --upgrade .
dev-install:
pip install --upgrade -e .[test]
docs: doc-html doc-pdf
doc-html: test
cd $(DOCS_DIR); $(MAKE) html
doc-pdf: test
cd $(DOCS_DIR); $(MAKE) latexpdf
release: quality 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
tox:
tox
quality:
flake8 flask_simplemde tests
clean:
cd $(DOCS_DIR) && $(MAKE) clean
rm -rf build/ dist/ htmlcov/ *.egg-info MANIFEST $(DOCS_DIR)/conf.pyc *~