-
Notifications
You must be signed in to change notification settings - Fork 9
/
Makefile
58 lines (44 loc) · 1.55 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
.PHONY: tests
help:
@Echo clean: runs autopep to improve formatting of code
@Echo reqs: replace requirements.txt file for use by collaborators to create virtual environments and for use in documentation
@Echo tests: runs unit tests
@Echo html: clears files from docs folder, rebuilds docs from source folder
@Echo release: runs build to create tar and wheel for distribution
@Echo all: runs clean build and docs folders, creates new html folders in build, moves relevant files to docs, and runs unittests and autopep.
reqs:
@pip freeze > requirements.txt
clean:
# Running autopep8
@autopep8 -r --in-place teaspoon/
tests:
# Running unittests
@python -m unittest
release:
python setup.py sdist bdist_wheel
html:
# Running sphinx-build to build html files in build folder.
rm -r docs
mkdir docs
sphinx-build -M html doc_source docs
rsync -a docs/html/ docs/
rm -r docs/html
all:
# Cleaning build folder
@mkdir $(shell pwd)/build/temp
@rm -rf $(shell pwd)/build/
@mkdir $(shell pwd)/build/
# Cleaning docs folder
@mkdir $(shell pwd)/docs/temp
@rm -rf $(shell pwd)/docs/
@mkdir $(shell pwd)/docs/
# Running sphinx-build to build html files.
@$(SPHINXBUILD) -M html "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
# Copying over contents of build/html to docs
@mkdir $(shell pwd)/docs/.doctrees
@cp -a $(shell pwd)/build/doctrees/. $(shell pwd)/docs/.doctrees/
@cp -a $(shell pwd)/build/html/. $(shell pwd)/docs/
# Running autopep8
@autopep8 -r --in-place teaspoon/
# Running unittests
@python -m unittest