1- .PHONY : clean clean-test clean-pyc clean-build docs help
21.DEFAULT_GOAL := help
32
43define PRINT_HELP_PYSCRIPT
@@ -12,30 +11,40 @@ for line in sys.stdin:
1211endef
1312export PRINT_HELP_PYSCRIPT
1413
14+ .PHONY : help
15+ help : # # shows the help menu
1516help :
1617 @python -c " $$ PRINT_HELP_PYSCRIPT" < $(MAKEFILE_LIST )
1718
18- clean : # # remove all build, test, coverage and Python artifacts
19- clean-build clean-pyc clean-test
20-
19+ .PHONY : clean-build
2120clean-build : # # remove build artifacts
21+ clean-build :
2222 rm -fr build/
2323 rm -fr dist/
2424 rm -fr .eggs/
2525 find . -name ' *.egg-info' -exec rm -fr {} +
2626 find . -name ' *.egg' -exec rm -f {} +
2727
28+ .PHONY : clean-pyc
2829clean-pyc : # # remove Python file artifacts
30+ clean-pyc :
2931 find . -name ' *.pyc' -exec rm -f {} +
3032 find . -name ' *.pyo' -exec rm -f {} +
3133 find . -name ' *~' -exec rm -f {} +
3234 find . -name ' __pycache__' -exec rm -fr {} +
3335
36+ .PHONY : clean-test
3437clean-test : # # remove test and coverage artifacts
38+ clean-test :
3539 rm -fr .tox/
3640 rm -f .coverage
3741 rm -fr htmlcov/
3842
43+ .PHONY : clean
44+ clean : # # remove all build, test, coverage and Python artifacts
45+ clean : clean-build clean-pyc clean-test
46+
47+ .PHONY : lint
3948lint : # # check style with black code style
4049 black --check asyncorm
4150
@@ -46,30 +55,35 @@ test-all: ## run tests on every Python version with tox
4655 tox
4756
4857coverage : # # check code coverage quickly with the default Python
49- coverage run --source asyncorm setup.py test
50-
58+ coverage : coverage run --source asyncorm setup.py test
5159 coverage report -m
5260 coverage html
5361 $(BROWSER ) htmlcov/index.html
5462
63+ .PHONY : docs
5564docs : # # generate Sphinx HTML documentation, including API docs
65+ docs :
5666 rm -f docs/asyncorm.rst
5767 rm -f docs/modules.rst
5868 sphinx-apidoc -o docs/ asyncorm
5969 $(MAKE ) -C docs clean
6070 $(MAKE ) -C docs html
6171
62- servedocs : docs # # compile the docs watching for changes
72+ servedocs : # # compile the docs watching for changes
73+ servedocs : docs
6374 watchmedo shell-command -p ' *.rst' -c ' $(MAKE) -C docs html' -R -D .
6475
65- release : clean # # package and upload a release
76+ release : # # package and upload a release
77+ release : clean
6678 python setup.py sdist upload
6779 python setup.py bdist_wheel upload
6880
69- dist : clean # # builds source and wheel package
81+ dist : # # builds source and wheel package
82+ dist : clean
7083 python setup.py sdist
7184 python setup.py bdist_wheel
7285 ls -l dist
7386
74- install : clean # # install the package to the active Python's site-packages
87+ install : # # install the package to the active Python's site-packages
88+ install : clean
7589 python setup.py install
0 commit comments