forked from python-openxml/python-docx
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
76 lines (58 loc) · 1.95 KB
/
Copy pathMakefile
File metadata and controls
76 lines (58 loc) · 1.95 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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
BEHAVE = behave
MAKE = make
TWINE = twine
UV = uv
.PHONY: accept build clean cleandocs coverage docs install lint opendocs sdist sync
.PHONY: test test-upload typecheck wheel
help:
@echo "Please use \`make <target>' where <target> is one or more of"
@echo " accept run acceptance tests using behave"
@echo " build generate both sdist and wheel suitable for upload to PyPI"
@echo " clean delete intermediate work product and start fresh"
@echo " cleandocs delete intermediate documentation files"
@echo " coverage run pytest with coverage"
@echo " docs generate documentation"
@echo " lint run Ruff"
@echo " opendocs open browser to local version of documentation"
@echo " register update metadata (README.rst) on PyPI"
@echo " sdist generate a source distribution into dist/"
@echo " sync create/update the UV-managed virtual environment"
@echo " test run unit tests using pytest"
@echo " test-upload upload distribution to TestPyPI"
@echo " typecheck run ty"
@echo " upload upload distribution tarball to PyPI"
@echo " wheel generate a binary distribution into dist/"
accept:
$(UV) run --group test $(BEHAVE) --stop
build:
$(UV) build
clean:
# find . -type f -name \*.pyc -exec rm {} \;
fd -e pyc -I -x rm
rm -rf dist *.egg-info .coverage .DS_Store
cleandocs:
$(MAKE) -C docs clean
coverage:
$(UV) run --group test pytest --cov-report term-missing --cov=docx tests/
docs:
$(MAKE) -C docs html
install:
$(MAKE) sync
lint:
$(UV) run --group lint ruff check .
opendocs:
open docs/.build/html/index.html
sdist:
$(UV) build --sdist
sync:
$(UV) sync
test:
$(UV) run --group test pytest -x
test-upload: sdist wheel
$(UV) run --group publish $(TWINE) upload --repository testpypi dist/*
typecheck:
$(UV) run --group typing ty check
upload: clean sdist wheel
$(UV) run --group publish $(TWINE) upload dist/*
wheel:
$(UV) build --wheel