-
-
Notifications
You must be signed in to change notification settings - Fork 57
Expand file tree
/
Copy pathMakefile
More file actions
39 lines (27 loc) · 766 Bytes
/
Makefile
File metadata and controls
39 lines (27 loc) · 766 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
checkfiles = asyncmy/ tests/ examples/ conftest.py build.py
py_warn = PYTHONDEVMODE=1
MYSQL_PASS ?= "123456"
up:
@uv lock --upgrade
$(MAKE) deps options=--frozen
deps:
uv sync --all-groups $(options)
_style:
@ruff format $(checkfiles)
@ruff check --fix $(checkfiles)
style: deps _style
_check:
@ruff format --check $(checkfiles) || (echo "Please run 'make style' to auto-fix style issues" && false)
@ruff check $(checkfiles)
@mypy $(checkfiles)
check: deps _check
_test:
$(py_warn) MYSQL_PASS=$(MYSQL_PASS) pytest
test: deps _test
clean:
@rm -rf *.so && rm -rf build && rm -rf dist && rm -rf asyncmy/*.c && rm -rf asyncmy/*.so && rm -rf asyncmy/*.html
build: clean
@uv build
benchmark: deps
@python -m benchmark.run_all
ci: deps _check _test