Skip to content

Commit a53cc18

Browse files
committed
Add Makefile
Add a Makefile to streamline test, build and cleaning operations.
1 parent 582fed0 commit a53cc18

File tree

1 file changed

+57
-0
lines changed

1 file changed

+57
-0
lines changed

Makefile

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
SHELL=/bin/bash
2+
3+
# Build recipes
4+
.PHONY : build
5+
build : tests docs buildpackage ;
6+
7+
.PHONY : buildpackage
8+
buildpackage : setup.py
9+
python setup.py sdist
10+
11+
docs : docs/Makefile
12+
cd docs/
13+
make html
14+
15+
16+
# Local testing recipes
17+
.PHONY : tests
18+
tests: toxtest lint ;
19+
20+
.PHONY : toxtest
21+
toxtest : local/environment.sh tox.ini
22+
source local/environment.sh
23+
tox
24+
25+
.PHONY : pytest
26+
pytest : local/environment.sh
27+
source local/environment.sh
28+
pytest
29+
30+
.PHONY : lint
31+
lint :
32+
flake8 ciscosparkapi
33+
34+
35+
# Cleaning recipes
36+
.PHONY : clean
37+
clean : cleanbuild cleandocs cleanpytest cleantox cleandist ;
38+
39+
.PHONY : cleandist
40+
cleandist :
41+
rm -rf ./dist/*
42+
43+
.PHONY : cleanbuild
44+
cleanbuild :
45+
rm -rf ./ciscosparkapi.egg-info/
46+
47+
.PHONY : cleandocs
48+
cleandocs :
49+
rm -rf ./docs/_build/*
50+
51+
.PHONY : cleantox
52+
cleantox : cleanpytest
53+
rm -rf ./.tox/
54+
55+
.PHONY : cleanpytest
56+
cleanpytest :
57+
rm -rf ./.cache/

0 commit comments

Comments
 (0)