forked from google/diff-match-patch
-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathmakefile
More file actions
46 lines (35 loc) · 713 Bytes
/
makefile
File metadata and controls
46 lines (35 loc) · 713 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
SRCS:=diff_match_patch
EXTRAS:=dev
ifeq ($(OS),Windows_NT)
ACTIVATE:=.venv/Scripts/activate
else
ACTIVATE:=.venv/bin/activate
endif
UV:=$(shell uv --version)
ifdef UV
VENV:=uv venv
PIP:=uv pip
else
VENV:=python -m venv
PIP:=python -m pip
endif
.venv:
$(VENV) .venv
venv: .venv
source $(ACTIVATE) && make install
echo 'run `source $(ACTIVATE)` to use virtualenv'
install:
$(PIP) install -Ue .[$(EXTRAS)]
release: lint test clean
python -m flit publish
format:
python -m ufmt format $(SRCS)
lint:
python -m ufmt check $(SRCS)
python -m mypy -p $(SRCS)
test:
python -m unittest -v $(SRCS).tests
clean:
rm -rf build dist html README MANIFEST *.egg-info
distclean: clean
rm -rf .venv