forked from SpotlightKid/python-rtmidi
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
74 lines (59 loc) · 1.84 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
.PHONY: clean-pyc clean-build docs clean
PYTHON ?= python
SOURCES = src/_rtmidi.pyx src/rtmidi/RtMidi.cpp
help:
@echo "build - build extension module (and place it in the rtmidi package)"
@echo "check-docs - check docstrings with pycodestyle"
@echo "clean-build - remove build artifacts"
@echo "clean-docs - remove docs output"
@echo "clean-pyc - remove Python file artifacts"
@echo "coverage - check code coverage quickly with the default Python"
@echo "dist - build distribution packages"
@echo "docs - generate Sphinx HTML documentation, including API docs"
@echo "lint - check style with flake8"
@echo "release - package a release"
@echo "release_upload - package a release and upload it to PyPI"
@echo "test - run tests on every supported Python version with tox"
build: $(SOURCES)
$(PYTHON) setup.py build_ext --inplace
check-docs:
pydocstyle rtmidi src
clean: clean-build clean-docs clean-pyc
rm -fr htmlcov/
clean-build:
rm -fr build/
rm -fr dist/
rm -fr *.egg-info
rm -fr rtmidi/*.so
rm -fr src/_rtmidi.cpp
clean-docs:
rm -fr docs/_build
clean-pyc:
find . -name '*.pyc' -exec rm -f {} +
find . -name '*.pyo' -exec rm -f {} +
find . -name '*~' -exec rm -f {} +
find . -name __pycache__ -type d -exec rm -rf {} +
coverage:
coverage run --source rtmidi setup.py test
coverage report -m
coverage html
xdg-open htmlcov/index.html
dist: clean release
ls -l dist
docs: release
rm -f docs/rtmidi.rst
rm -f docs/modules.rst
$(PYTHON) setup.py build_ext --inplace
sphinx-apidoc -o docs/ rtmidi rtmidi/release.py
cat docs/api.rst.inc >> docs/rtmidi.rst
$(MAKE) -C docs clean
$(MAKE) -C docs html
xdg-open docs/_build/html/index.html
lint:
flake8 rtmidi tests examples
release: clean
$(PYTHON) setup.py release
release_upload: release
twine upload --skip-existing dist/*.tar.gz
test:
PYTHONPATH=examples $(PYTHON) setup.py test