-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
52 lines (42 loc) · 1006 Bytes
/
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
.update-pip:
@python -m pip install --upgrade pip
@pip install pip-tools
@touch .update-pip
.develop: .update-pip
@pip install -r requirements/requirements.dev.txt
@pip install -e .
@touch .develop
.PHONY: build
build: clean
@python setup.py build
.PHONY: clean
clean:
@rm -rf `find . -name __pycache__`
@rm -rf `find . -name .hash`
@rm -f `find . -type f -name '*.py[co]' `
@rm -rf build
@python setup.py clean
@rm -f .develop .update-pip
@rm -rf *.egg-info
@rm -rf .pytest_cache
@rm -rf .mypy_cache
.PHONY: compile-deps
compile-deps: .update-pip
pip-compile --allow-unsafe -q --strip-extras \
requirements/requirements.dev.in
pip-compile --allow-unsafe -q --strip-extras \
requirements/requirements.bench.in
.PHONY: doc
doc: .develop
@make -C docs html SPHINXOPTS="-W -E"
.PHONY: fmt format
fmt format:
python -m pre_commit run --all-files --show-diff-on-failure
.PHONY: lint
lint: fmt mypy
.PHONY: mypy
mypy:
mypy pysegmenttree
.PHONY: test
test: .develop
@pytest -v