From 1bdd911a1fa457488da5744c476da5483d551c32 Mon Sep 17 00:00:00 2001 From: Gang Li Date: Fri, 27 Sep 2024 13:08:47 +0800 Subject: [PATCH] Add Makefile Signed-off-by: Gang Li --- Makefile | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 Makefile diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..8d6a00c --- /dev/null +++ b/Makefile @@ -0,0 +1,37 @@ +init-venv: + @pip install virtualenv + @python -m virtualenv venv + @source venv/bin/activate + @pip install -r requirements.txt + @pip install tox +.PHONY: init, init-venv + +lint: + @python -m tox -e flake8 + @python -m tox -e pylint +.PHONY: lint + +test-only: + @python -m tox -e test +.PHONY: test-only + +test: lint test-only +.PHONY: test + +clean: + rm -rf .coverage .tox .mypy_cache __pytest_reports htmlcov + rm -rf build charon.egg-info dist local package +.PHONY: clean + +build: + @pip install -r ./requirements.txt + @pip install . +.PHONY: build + +sdist: + @python3 setup.py sdist +.PHONY: sdist + +image-latest: + @podman build . -f ./image/Containerfile -t localhost/charon:latest +.PHONY: image-latest