-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
40 lines (28 loc) · 1.46 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
37
38
39
40
.DEFAULT_GOAL := help
.PHONY: clean package package-deps package-source package-upload package-wheel
package-tar: ## Package repo as tar for easy distribution
rm -rf tar-package/
mkdir tar-package/
git-archive-all --force-submodules --prefix demystify/ tar-package/demystify-v0.0.0.tar.gz
package-deps: ## Upgrade dependencies for packaging
python3 -m pip install --upgrade twine wheel
package-source: ## Package the source code
python3 setup.py sdist
package-wheel: clean package-deps ## Package a Python wheel
python3 setup.py bdist_wheel --universal
package-check: clean package-source package-wheel ## Check the distribution is valid
twine check dist/*
package-upload-test: clean package-deps package-check ## Upload package to test.pypi
twine upload dist/* --repository-url https://test.pypi.org/legacy/ --verbose
package-upload: clean package-deps package-check ## Upload package to pypi
twine upload dist/* --repository-url https://upload.pypi.org/legacy/ --verbose
package: package-upload
clean: ## Clean the package directory
rm -rf src/*.egg-info/
rm -rf build/
rm -rf dist/
rm -rf tar-package/
wheel: # Update the wheel for use with PyScript
python setup.py sdist bdist_wheel
help: ## Print this help message.
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'