-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathMakefile
More file actions
30 lines (22 loc) · 815 Bytes
/
Makefile
File metadata and controls
30 lines (22 loc) · 815 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
.PHONY: pytest ruff nox wc clean clobber upload
XARGS := xargs $(shell test $$(uname) = Linux && echo -r)
VERSION := $(shell grep 'version = "' pyproject.toml | cut -f2 -d'"')
pytest:
uv run pytest
ruff:
uv run ruff check --fix --extend-select I
nox:
uv run noxfile.py
wc:
find . -path './.nox' -prune -o -path './build' -prune -o -path './dist' -prune -o -path './.venv' -prune -o -name '*.py' -print0 | $(XARGS) -0 wc -l
clean:
find . \( -name '*.pyc' -o -name '*~' \) -print0 | $(XARGS) -0 rm
find . -name '__pycache__' -type d -print0 | $(XARGS) -0 rm -r
find . -name '.pytest_cache' -type d -print0 | $(XARGS) -0 rm -r
find . -name '.ruff_cache' -type d -print0 | $(XARGS) -0 rm -r
rm -fr build dist
clobber: clean
rm -fr .nox
upload:
uv build
uv publish dist/dark_matter-$(VERSION).tar.gz