-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
38 lines (30 loc) · 919 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
.PHONY: help
help: ## show help
@grep -h '##\ [[:alnum:]]' $(MAKEFILE_LIST) | sed -E 's/(.*):.*##(.*)/\1: \2/' | column -s: -t
venv: ## create venv
python3 -m venv venv
.PHONY: install
install: venv ## install/upgrade packaging tools
venv/bin/pip install --upgrade --upgrade-strategy eager build pip twine
.PHONY: develop
develop: install ## install package in 'development mode'
venv/bin/python -m pip install -e .
.PHONY: test
test: ## run tests
venv/bin/pip install --upgrade --upgrade-strategy eager tox
venv/bin/tox
.PHONY: clean
clean: ## cleanup
rm -rf .tox
rm -rf dist
rm -rf src/*.egg-info
rm -rf tests/__pycache__
.PHONY: build
build: clean ## build
venv/bin/python -m build
.PHONY: upload_test
upload_test: build ## upload to https://test.pypi.org
venv/bin/twine upload --repository testpypi dist/*
.PHONY: upload
upload: build ## upload to https://pypi.org
venv/bin/twine upload dist/*