-
Notifications
You must be signed in to change notification settings - Fork 15
Expand file tree
/
Copy pathMakefile
More file actions
34 lines (26 loc) · 914 Bytes
/
Makefile
File metadata and controls
34 lines (26 loc) · 914 Bytes
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
.PHONY: help clean lint build publish
.DEFAULT: help
export PYTHONPATH="${PYTHONOCPATH}:$(CURDIR)"
help:
@echo "\nUsage:"
@echo "make <command>"
@echo "\nAvailable Commands:"
@echo "- clean\t\t Run clean project."
@echo "- lint\t\t Check python code against some of the style conventions in PEP 8 and terraform format."
@echo "- build\t\t Builds a package, as a tarball and a wheel by default."
@echo "- publish\t Publishes a package to a remote repository.\n\n"
clean:
@echo "\n> Run clean project\n";\
find . -name '*.pyc' -exec rm --force {} +;\
find . -name '*.pyo' -exec rm --force {} +;\
find . | grep -E "__pycache__|.pyc" | xargs rm -rf;\
rm -rf dist/;\
lint:
@echo "\nRun lint project\n";\
black . & flake8 .
build:
@echo "\nBuilds a package, as a tarball and a wheel by default.\n";\
poetry build
publish:
@echo "\nRun publish package in pypi\n";\
poetry run twine upload dist/*