-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmakefile
More file actions
51 lines (39 loc) · 1.09 KB
/
Copy pathmakefile
File metadata and controls
51 lines (39 loc) · 1.09 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
.PHONY: clean clean-venv clean-build clean-cache venv build install install-dev test
help: ## Show this help message
@awk 'BEGIN {FS = ":.*?## "}; /^[a-zA-Z_-]+:.*?##/ { printf "\033[36m%-20s\033[0m %s\n", $$1, $$2 }' $(MAKEFILE_LIST)
.DEFAULT_GOAL := help
clean: ## Clean any generated files and environments
{ \
make clean-venv ;\
make clean-build ;\
make clean-cache ;\
}
clean-venv: ## Clean virtual environment
rm -rf .venv
clean-build: ## Clean build folder
rm -rf dist
clean-cache: ## Clean .pyc and .egg-info files
{ \
rm -rf build/ dist/ *.egg-info/ ;\
find . -type d -name __pycache__ -delete ;\
find . -name "*.pyc" -delete ;\
}
venv: ## Make a new virtual environment
python -m venv .venv
build: ## Create a wheel distribution
python setup.py sdist bdist_wheel
install: ## Install the module
{ \
. .venv/scripts/activate ;\
pip install -e . ;\
}
install-dev: ## Install the module + dev tools
{ \
. .venv/scripts/activate ;\
pip install -e .[dev] ;\
}
test: ## Run pytest tests
{ \
. .venv/scripts/activate ;\
python -m pytest Tests/ -v ;\
}