forked from getsentry/sentry-python
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
66 lines (54 loc) · 1.69 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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
SHELL = /bin/bash
VENV_PATH = .venv
help:
@echo "Thanks for your interest in the Sentry Python SDK!"
@echo
@echo "make lint: Run linters"
@echo "make test: Run basic tests (not testing most integrations)"
@echo "make test-all: Run ALL tests (slow, closest to CI)"
@echo "make format: Run code formatters (destructive)"
@echo "make aws-lambda-layer: Build AWS Lambda layer directory for serverless integration"
@echo
@echo "Also make sure to read ./CONTRIBUTING.md"
@false
.venv:
virtualenv -ppython3 $(VENV_PATH)
$(VENV_PATH)/bin/pip install tox
dist: .venv
rm -rf dist dist-serverless build
$(VENV_PATH)/bin/pip install wheel
$(VENV_PATH)/bin/python setup.py sdist bdist_wheel
.PHONY: dist
format: .venv
$(VENV_PATH)/bin/tox -e linters --notest
.tox/linters/bin/black .
.PHONY: format
test: .venv
@$(VENV_PATH)/bin/tox -e py3.9
.PHONY: test
test-all: .venv
@TOXPATH=$(VENV_PATH)/bin/tox sh ./scripts/runtox.sh
.PHONY: test-all
check: lint test
.PHONY: check
lint: .venv
@set -e && $(VENV_PATH)/bin/tox -e linters || ( \
echo "================================"; \
echo "Bad formatting? Run: make format"; \
echo "================================"; \
false)
.PHONY: lint
apidocs: .venv
@$(VENV_PATH)/bin/pip install --editable .
@$(VENV_PATH)/bin/pip install -U -r ./docs-requirements.txt
@$(VENV_PATH)/bin/sphinx-build -vv -W -b html docs/ docs/_build
.PHONY: apidocs
apidocs-hotfix: apidocs
@$(VENV_PATH)/bin/pip install ghp-import
@$(VENV_PATH)/bin/ghp-import -pf docs/_build
.PHONY: apidocs-hotfix
aws-lambda-layer: dist
$(VENV_PATH)/bin/pip install urllib3
$(VENV_PATH)/bin/pip install certifi
$(VENV_PATH)/bin/python -m scripts.build_aws_lambda_layer
.PHONY: aws-lambda-layer