forked from elastic/apm-agent-python
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
29 lines (23 loc) · 950 Bytes
/
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
BUILD_DIR?=build
SHELL := /bin/bash
isort:
isort --vb .
flake8:
flake8
test:
# delete any __pycache__ folders to avoid hard-to-debug caching issues
find . -type f -name '*.py[co]' -delete -o -type d -name __pycache__ -delete
# pypy3 should be added to the first `if` once it supports py3.7
if [[ "$$PYTHON_VERSION" =~ ^(3.7|3.8|3.9|3.10|3.11|3.12|nightly)$$ ]] ; then \
echo "Python 3.7+, with asyncio"; \
pytest -v $(PYTEST_ARGS) --showlocals $(PYTEST_MARKER) $(PYTEST_JUNIT); \
else \
echo "Python < 3.7, without asyncio"; \
pytest -v $(PYTEST_ARGS) --showlocals $(PYTEST_MARKER) $(PYTEST_JUNIT) --ignore-glob='*/asyncio*/*'; \
fi
coverage: PYTEST_ARGS=--cov --cov-context=test --cov-config=setup.cfg --cov-branch
coverage: export COVERAGE_FILE=.coverage.docker.$(PYTHON_FULL_VERSION).$(FRAMEWORK)
coverage: test
docs:
bash ./scripts/build_docs.sh apm-agent-python ./docs ${BUILD_DIR}
.PHONY: isort flake8 test coverage docs