-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
55 lines (42 loc) · 1.32 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
# vim: set noet sw=4 ts=4 fileencoding=utf-8:
# Project-specific constants
NAME=mosromgr
DOC_HTML=docs/build/html
DOC_TREES=docs/build/doctrees
# Default target
all:
@echo "make install - Install on local system"
@echo "make develop - Install symlinks for development"
@echo "make build - Build sdist and bdist_wheel"
@echo "make clean - Remove all generated files"
@echo "make lint - Run linter"
@echo "make test - Run tests"
@echo "make doc-graphs - Generate graphviz graphs"
@echo "make doc - Build the docs as HTML"
@echo "make doc-serve - Serve the docs locally"
@echo "make release - Release to PyPI"
install:
pip install .
develop:
pip install -e .[test,doc]
pip install twine
@echo "To build the docs you will also need to install graphviz using apt/brew"
build: clean
python setup.py sdist bdist_wheel
clean:
rm -rf build/ dist/ $(NAME).egg-info/ docs/build/ .pytest_cache/ .coverage
lint:
pylint -E mosromgr
test:
coverage run --rcfile coverage.cfg -m pytest -v tests
coverage report --rcfile coverage.cfg
doc-graphs:
python docs/images/class_hierarchy.py
doc: doc-graphs
rm -rf docs/build/
sphinx-build -b html -d $(DOC_TREES) docs/ $(DOC_HTML)
doc-serve:
python -m http.server -d $(DOC_HTML)
release:
twine upload dist/*
.PHONY: all install develop build clean lint test doc-graphs doc doc-serve release