Debian Codegraph @

Makefile

raw symbols SCIP
1 # Copyright 2015-2021 Nir Cohen
2 #
3 # Licensed under the Apache License, Version 2.0 (the "License");
4 # you may not use this file except in compliance with the License.
5 # You may obtain a copy of the License at
6 #
7 # http://www.apache.org/licenses/LICENSE-2.0
8 #
9 # Unless required by applicable law or agreed to in writing, software
10 # distributed under the License is distributed on an "AS IS" BASIS,
11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 # See the License for the specific language governing permissions and
13 # limitations under the License.
14
15 # Name of this package
16 PACKAGENAME = distro
17
18 # You can set these variables from the command line, and also
19 # from the environment for the first two.
20 SPHINXOPTS ?= -n -v
21 SPHINXBUILD ?= sphinx-build
22 SPHINXSOURCEDIR = docs
23 SPHINXBUILDDIR = docs/_build
24
25 .PHONY: help
26 help:
27 @echo 'Please use "make <target>" where <target> is one of'
28 @echo " release - build a release and publish it"
29 @echo " dev - prepare a development environment (includes tests)"
30 @echo " instdev - prepare a development environment (no tests)"
31 @echo " install - install into current Python environment"
32 @echo " clobber - remove any build products"
33 @echo " build - build the package"
34 @echo " test - test from this directory using tox, including test coverage"
35 @echo " publish - upload to PyPI"
36 @echo " clean - remove any temporary build products"
37 @echo " dry-run - perform all action required for a release without actually releasing"
38 @$(SPHINXBUILD) -M help "$(SPHINXSOURCEDIR)" "$(SPHINXBUILDDIR)" $(SPHINXOPTS) $(O)
39
40 .PHONY: release
41 release: test clean build publish
42 @echo "$@ done."
43
44 .PHONY: test
45 test:
46 pip install 'tox>=1.9.0'
47 tox
48 @echo "$@ done."
49
50 .PHONY: clean
51 clean:
52 rm -rf dist build $(PACKAGENAME).egg-info
53 @echo "$@ done."
54
55 .PHONY: build
56 build:
57 python -m build
58
59 .PHONY: publish
60 publish:
61 twine upload -r pypi dist/$(PACKAGENAME)-*
62 @echo "$@ done."
63
64 .PHONY: dry-run
65 dry-run: test clean build
66 @echo "$@ done."
67
68 .PHONY: dev
69 dev: instdev test
70 @echo "$@ done."
71
72 .PHONY: instdev
73 instdev:
74 pip install -r dev-requirements.txt
75 pip install -e .
76 @echo "$@ done."
77
78 .PHONY: install
79 install:
80 pip install .
81 @echo "$@ done."
82
83 .PHONY: clobber
84 clobber: clean
85 rm -rf $(SPHINXBUILDDIR)
86 @echo "$@ done."
87
88 # Catch-all target: route all unknown targets to Sphinx using the new
89 # "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
90 .PHONY: Makefile
91 %: Makefile
92 @$(SPHINXBUILD) -M $@ "$(SPHINXSOURCEDIR)" "$(SPHINXBUILDDIR)" $(SPHINXOPTS) $(O)