-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
53 lines (44 loc) · 1.41 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
PYTHON3 := $(shell which python3 2>/dev/null)
PYTHON := python3
.PHONY: help
help:
@echo "Please use \`make <target>' where <target> is one of"
@echo " install to install the PennyLane Sphinx Theme"
@echo " wheel to build the PennyLane Sphinx Theme wheel"
@echo " dist to build the PennyLane Sphinx Theme source distribution"
@echo " docs to generate the Sphinx documentation"
@echo " lint to lint the Python source files"
@echo " format to format the Python source files"
@echo " clean to delete all temporary, cache, and build files"
@echo " clean-docs to delete all generated documentation"
.PHONY: install
install:
ifndef PYTHON3
@echo "You need to install Python 3 before installing the PennyLane Sphinx Theme"
endif
$(PYTHON) -m pip install -e .
.PHONY: wheel
wheel:
$(PYTHON) -m build --no-isolation --wheel
.PHONY: dist
dist:
$(PYTHON) -m build --no-isolation --sdist
.PHONY : docs
docs:
make -C doc html
.PHONY: lint
lint:
$(PYTHON) -m pylint pennylane_sphinx_theme
.PHONY: format
format:
$(PYTHON) -m black --check --diff --color -l 100 pennylane_sphinx_theme
$(PYTHON) -m isort --check --diff --color --profile black pennylane_sphinx_theme
.PHONY : clean
clean:
rm -rf build
rm -rf dist
rm -rf pennylane_sphinx_theme/__pycache__
.PHONY : clean-docs
clean-docs:
rm -rf doc/api
make -C doc clean