Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 31
Expand file tree
/
Copy pathMakefile
More file actions
Latest commit
35 lines (27 loc) · 1.32 KB
/
Copy pathMakefile
File metadata and controls
35 lines (27 loc) · 1.32 KB
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
VENV_DIR ?= .venv
VENV_RUN = . $(VENV_DIR)/bin/activate
PIP_CMD ?= pip
BUILD_DIR ?= dist
usage: ## Show this help
@fgrep -h "##"$(MAKEFILE_LIST)| fgrep -v fgrep | sed -e 's/\\$$//'| sed -e 's/##//'
install: ## Install dependencies in local virtualenv folder
(test `which virtualenv`||$(PIP_CMD) install --user virtualenv) &&\
(test -e $(VENV_DIR)|| virtualenv $(VENV_OPTS)$(VENV_DIR)) &&\
($(VENV_RUN)&&$(PIP_CMD) install --upgrade pip) &&\
(test ! -e setup.cfg || ($(VENV_RUN);$(PIP_CMD) install .[test]))
publish: ## Publish the library to the central PyPi repository
# build and upload archive
rm -rf $(BUILD_DIR)
$(VENV_RUN);$(PIP_CMD) install --upgrade build twine &&\
python -m build --sdist --wheel &&\
twine upload $(BUILD_DIR)/*
test: ## Run automated tests
($(VENV_RUN);test`which localstack`|| pip install .[test]) &&\
$(VENV_RUN); DEBUG=$(DEBUG) PYTHONPATH=. pytest -sv $(PYTEST_ARGS) tests
lint: ## Run code linter to check code style
$(VENV_RUN); flake8 --ignore=E501 localstack_client tests
format: ## Run code formatter (black)
$(VENV_RUN); black localstack_client tests; isort localstack_client tests
clean: ## Clean up virtualenv
rm -rf $(VENV_DIR)
.PHONY: usage install clean publish test lint format