-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathMakefile
More file actions
57 lines (43 loc) · 1.01 KB
/
Copy pathMakefile
File metadata and controls
57 lines (43 loc) · 1.01 KB
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
47
48
49
50
51
52
53
54
55
56
57
UV= uv
UVX= uvx
TOX= $(UV) run tox
GIT= git
SOURCE_DATE_EPOCH= $(shell $(GIT) log -1 --pretty=%ct)
DIST_ENV= SOURCE_DATE_EPOCH="$(SOURCE_DATE_EPOCH)"
-include Makefile.local
## ======================================================================
.PHONY: default
default: dist
.PHONY: clean
clean:
$(RM) -r .tox .venv dist uv.lock src/*.egg-info
find src tests -name __pycache__ -exec $(RM) -r {} +
find src -name "*.so" -exec $(RM) {} +
.PHONY: test
test:
$(UV) sync --group dev
$(TOX)
## ======================================================================
.PHONY: dist
dist:
$(DIST_ENV) \
$(UV) build
.PHONY: dist-source
dist-source:
$(DIST_ENV) \
$(UV) build --sdist
.PHONY: dist-wheel
dist-wheel:
$(DIST_ENV) \
$(UV) build --wheel
.PHONY: dist-check
dist-check:
$(UVX) twine check --strict dist/*
.PHONY: dist-upload
dist-upload:
$(RM) dist/*.whl
$(UV) publish --index pypi-nkf dist/*
.PHONY: dist-upload-test
dist-upload-test:
$(RM) dist/*.whl
$(UV) publish --index test-pypi-nkf dist/*