-
-
Notifications
You must be signed in to change notification settings - Fork 111
/
Makefile
36 lines (30 loc) · 1.14 KB
/
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
.PHONY: help
help: ## Show this help.
# Taken from https://stackoverflow.com/a/35730328/6925187
@egrep '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-22s\033[0m %s\n", $$1, $$2}'
.PHONY: install
install: ## Install dependencies
python -m pip install --upgrade pip
pip install --upgrade --requirement requirements-dev.txt
.PHONY: install-bundle
install-bundle: ## Install the locally packaged swarmlib bundle (wheel)
python -m pip install --upgrade pip
pip install --upgrade `find dist -iname '*.whl'`
swarm --version
.PHONY: test
test: ## Run tests
pytest tests
.PHONY: lint
lint: ## Lint
pylint swarmlib tests
.PHONY: bundle
bundle: ## Bundle swarmlib
cp ThirdPartyNotices.txt LICENSE.txt swarmlib
python setup.py sdist bdist_wheel
twine check dist/*
rm swarmlib/ThirdPartyNotices.txt swarmlib/LICENSE.txt
.PHONY: clean
clean: ## Clean the project. Remove all cache/temporary files
# Taken from https://stackoverflow.com/a/41386937/6925187
find . -type f -name '*.py[co]' -delete -o -type d -name __pycache__ -delete
rm -rf swarmlib.egg-info .coverage coverage.xml build dist .pytest_cache