-
Notifications
You must be signed in to change notification settings - Fork 30
/
Copy pathMakefile
29 lines (20 loc) · 823 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
.PHONY: help release build clean
LIBRARY := pydatastream
# taken from: https://marmelab.com/blog/2016/02/29/auto-documented-makefile.html
.DEFAULT_GOAL := help
help:
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
build: ## Make distribution package
python setup.py sdist
release: ## Make package; upload to pypi and clean after`
@echo Do you really want to release the package to PyPi?
@echo "Type library name for release ($(LIBRARY)):"
@read -p"> " line; if [[ $$line != "$(LIBRARY)" ]]; then echo "Aborting. We'll release that later"; exit 1 ; fi
@echo "Starting the release..."
python setup.py sdist
twine upload dist/*
rm MANIFEST
rm -rf dist
clean: ## Erase distribution package
rm MANIFEST
rm -rf dist