-
Notifications
You must be signed in to change notification settings - Fork 68
Expand file tree
/
Copy pathmakefile
More file actions
48 lines (37 loc) · 829 Bytes
/
makefile
File metadata and controls
48 lines (37 loc) · 829 Bytes
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
SRC:=src/fixit/ scripts/
PKG:=fixit
EXTRAS:=dev,docs,lsp,pretty
UV:=$(shell uv --version)
ifdef UV
VENV:=uv venv
PIP:=uv pip
else
VENV:=python -m venv
PIP:=python -m pip
endif
all: venv test lint html
install:
$(PIP) install -Ue .[$(EXTRAS)]
.venv:
$(VENV) --prompt fixit .venv
venv: .venv
source .venv/bin/activate && make install
echo 'run `source .venv/bin/activate` to activate virtualenv'
test:
python -m $(PKG).tests
python -m mypy -p $(PKG)
pyrefly check -c pyproject.toml
lint:
python -m flake8 $(SRC)
python -m fixit lint $(SRC)
python -m ufmt check $(SRC)
python scripts/check_copyright.py
html: docs/*
python scripts/document_rules.py
sphinx-build -ab html docs html
format:
python -m ufmt format $(SRC)
clean:
rm -rf .mypy_cache build dist html *.egg-info
distclean: clean
rm -rf .venv