-
-
Notifications
You must be signed in to change notification settings - Fork 35
Expand file tree
/
Copy pathMakefile
More file actions
31 lines (24 loc) · 750 Bytes
/
Makefile
File metadata and controls
31 lines (24 loc) · 750 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
VENV = build/venv
venv: $(VENV)/.installed
$(VENV)/.installed: Makefile pyproject.toml
python3 -mvenv $(VENV)
$(VENV)/bin/python3 -m ensurepip
$(VENV)/bin/pip install -q -U pip
$(VENV)/bin/pip install -q -e .[dev,docs]
touch $(VENV)/.installed
build: venv
$(VENV)/bin/python3 -m build .
.PHONY: test
test: venv
$(VENV)/bin/pytest .
.PHONY: coverage
coverage: venv
$(VENV)/bin/pytest . -q --cov=multipart --cov-branch --cov-report=term --cov-report=html:build/htmlcov
.PHONY: docs
docs: venv
$(VENV)/bin/sphinx-build -M html docs build/docs
.PHONY: watchdocs
watchdocs: venv
$(VENV)/bin/sphinx-autobuild -a --watch . -b html docs build/docs/watch/
upload: build
$(VENV)/bin/python3 -m twine upload --skip-existing dist/multipart-*