-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathMakefile
More file actions
45 lines (37 loc) · 796 Bytes
/
Makefile
File metadata and controls
45 lines (37 loc) · 796 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
PYTHON?=python
SOURCES=squatter
UV:=$(shell uv --version)
ifdef UV
VENV:=uv venv
PIP:=uv pip
else
VENV:=python -m venv
PIP:=python -m pip
endif
.PHONY: venv
venv:
$(VENV) .venv
source .venv/bin/activate && make install
@echo 'run `source .venv/bin/activate` to use virtualenv'
# The rest of these are intended to be run within the venv, where python points
# to whatever was used to set up the venv.
.PHONY: install
install:
$(PIP) install -Ue .[dev]
.PHONY: test
test:
python -m coverage run -m squatter.tests $(TESTOPTS)
python -m coverage report
.PHONY: format
format:
python -m ufmt format $(SOURCES)
.PHONY: lint
lint:
python -m ufmt check $(SOURCES)
python -m flake8 $(SOURCES)
python -m mypy squatter
.PHONY: release
release:
rm -rf dist
hatch build
hatch publish