-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
40 lines (30 loc) · 920 Bytes
/
Makefile
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
BUILDDIR := $(shell ls -d build/cp3* | head -n 1)
.PHONY: build clean install test coverage stubs check
build:
meson compile -C $(BUILDDIR)
clean:
rm -rf build dist
rm -rf coverage.info coverage.xml coverage_cpp.xml
install:
make clean
uv pip install -e . \
--no-build-isolation \
--force-reinstall \
--config-settings=editable-verbose=true \
# --config-settings=setup-args="-Db_coverage=true" \
--config-settings=compile-args="-j8"
test:
meson test -C $(BUILDDIR) --verbose
coverage:
rm -rf coverage coverage.xml coverage_cpp.xml
mkdir coverage
make test
gcovr --xml coverage_cpp.xml --xml-pretty
gcovr --html-details -o coverage/index.html --exclude .venv
open coverage/index.html
stubs:
pybind11-stubgen pymmdevice._pymmdevice -o src
ruff format src/pymmdevice/_pymmdevice.pyi -v
ruff check src/pymmdevice/_pymmdevice.pyi --fix
check:
pre-commit run --all-files --hook-stage manual