Debian Codegraph @

Makefile

raw symbols SCIP
1 .PHONY: clean-pyc clean-build docs clean
2 define BROWSER_PYSCRIPT
3 import os, webbrowser, sys
4 try:
5 from urllib import pathname2url
6 except:
7 from urllib.request import pathname2url
8
9 webbrowser.open("file://" + pathname2url(os.path.abspath(sys.argv[1])))
10 endef
11 export BROWSER_PYSCRIPT
12 BROWSER := python -c "$$BROWSER_PYSCRIPT"
13
14 help:
15 @echo "clean - remove all build, test, coverage and Python artifacts"
16 @echo "clean-build - remove build artifacts"
17 @echo "clean-pyc - remove Python file artifacts"
18 @echo "clean-test - remove test and coverage artifacts"
19 @echo "lint - check style with flake8"
20 @echo "test - run tests quickly with the default Python"
21 @echo "test-all - run tests on every Python version with tox"
22 @echo "coverage - check code coverage quickly with the default Python"
23 @echo "docs - generate Sphinx HTML documentation, including API docs"
24 @echo "release - package and upload a release"
25 @echo "dist - package"
26 @echo "install - install the package to the active Python's site-packages"
27
28 clean: clean-build clean-pyc clean-test
29
30 clean-build:
31 rm -fr build/
32 rm -fr dist/
33 rm -fr .eggs/
34 find . -name '*.egg-info' -exec rm -fr {} +
35 find . -name '*.egg' -exec rm -f {} +
36
37 clean-pyc:
38 find . -name '*.pyc' -exec rm -f {} +
39 find . -name '*.pyo' -exec rm -f {} +
40 find . -name '*~' -exec rm -f {} +
41 find . -name '__pycache__' -exec rm -fr {} +
42
43 clean-test:
44 rm -fr .tox/
45 rm -f .coverage
46 rm -fr htmlcov/
47
48 lint:
49 flake8 dicompylercore tests
50
51 test:
52 python -m unittest discover -v
53
54 test-all:
55 tox
56
57 coverage:
58 coverage run --source dicompylercore -m unittest discover -v
59 coverage report -m
60 coverage html
61 $(BROWSER) htmlcov/index.html
62
63 docs:
64 rm -f docs/dicompyler-core.rst
65 rm -f docs/modules.rst
66 sphinx-apidoc -o docs/ dicompylercore
67 $(MAKE) -C docs clean
68 $(MAKE) -C docs html
69 $(BROWSER) docs/_build/html/index.html
70
71 servedocs: docs
72 watchmedo shell-command -p '*.rst' -c '$(MAKE) -C docs html' -R -D .
73
74 release: clean
75 python setup.py sdist upload
76 python setup.py bdist_wheel upload
77
78 dist: clean
79 python setup.py sdist
80 python setup.py bdist_wheel
81 ls -l dist
82
83 install: clean
84 python setup.py install