-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
executable file
·49 lines (38 loc) · 1.58 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
41
42
43
44
45
46
47
48
49
.DEFAULT_GOAL := help
.PHONY: help
help:
@grep -E '^[\.a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
.PHONY: pip-sync
pip-sync: ## Install all dev dependencies
python -m pip install "$$(grep '^pip-tools=' requirements-dev.txt)"
python -m piptools sync requirements-dev.txt
.PHONY: develop
develop: pip-sync pip-check ## Setup repository for development
.PHONY: pip-check
pip-check: ## Verify that all python package dependencies are met
python -m pip check
# Sets the annotation content for the files generated by pip-compile
export CUSTOM_COMPILE_COMMAND := make update-requirements
.PHONY: update-requirements
update-requirements: ## Regenerate requirements.txt with newest versions of dependencies
python -m piptools compile --rebuild --upgrade --quiet requirements.in
python -m piptools compile --rebuild --upgrade --quiet requirements-dev.in
.PHONY: upgrade
upgrade: ## Update all packages as available
python -m pip install --upgrade-strategy eager --upgrade $$(cat requirements.in | sed -n 's/==.*$$//p')
python -m pip install --upgrade-strategy eager --upgrade $$(cat requirements-dev.in | sed -n 's/==.*$$//p')
.PHONY: clean
clean: ## Clean the project directory
rm -fr *.egg-info
find . -name '*.pyc' -exec rm -f {} +
find . -name '*.pyo' -exec rm -f {} +
find . -name '*~' -exec rm -f {} +
.PHONY: dist
dist: clean
python setup.py sdist bdist_wheel
.PHONY: testupload
testupload: dist
twine upload --repository-url https://test.pypi.org/legacy/ dist/*
.PHONY: release
release: dist
twine upload dist/*