Skip to content

Commit a1a8d3a

Browse files
committed
Add makefile
1 parent 80f4544 commit a1a8d3a

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed

Makefile

+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# phony trick from https://keleshev.com/my-book-writing-setup/
2+
.PHONY: phony
3+
4+
install: phony
5+
ifndef VIRTUAL_ENV
6+
$(error install can only be run inside a Python virtual environment)
7+
endif
8+
@echo Installing dependencies...
9+
pip install -r requirements-dev.txt
10+
pip install -e .
11+
12+
lint: phony lint-flake lint-mypy
13+
14+
lint-flake: phony
15+
flake8
16+
17+
lint-flake-pre310: phony
18+
# Python <3.10 doesn't support pattern matching.
19+
flake8 --extend-exclude tests/test_pattern_matching.py
20+
21+
lint-mypy: phony
22+
mypy
23+
24+
test: phony
25+
pytest
26+
27+
docs: phony
28+
lazydocs \
29+
--overview-file README.md \
30+
--src-base-url https://github.com/rustedpy/maybe/blob/main/ \
31+
./src/maybe
32+

0 commit comments

Comments
 (0)