forked from stripe/stripe-python
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
49 lines (34 loc) · 1.18 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
VENV_NAME?=venv
PIP?=pip
PYTHON?=python3.10
DEFAULT_TEST_ENV?=py310
venv: $(VENV_NAME)/bin/activate
$(VENV_NAME)/bin/activate: setup.py requirements.txt
@test -d $(VENV_NAME) || $(PYTHON) -m venv --clear $(VENV_NAME)
${VENV_NAME}/bin/python -m pip install -r requirements.txt
@touch $(VENV_NAME)/bin/activate
test: venv pyright lint mypy
@${VENV_NAME}/bin/tox -p auto -e $(DEFAULT_TEST_ENV) $(TOX_ARGS)
test-nomock: venv
@${VENV_NAME}/bin/tox -p auto -- --nomock $(TOX_ARGS)
ci-test: venv
@${VENV_NAME}/bin/tox $(TOX_ARGS)
coveralls: venv
@${VENV_NAME}/bin/tox -e coveralls
pyright: venv
@${VENV_NAME}/bin/tox -e pyright $(PYRIGHT_ARGS)
mypy: venv
@${VENV_NAME}/bin/tox -e mypy $(MYPY_ARGS)
fmt: venv
@${VENV_NAME}/bin/tox -e fmt
fmtcheck: venv
@${VENV_NAME}/bin/tox -e fmt -- --check --verbose
lint: venv
@${VENV_NAME}/bin/tox -e lint
clean:
@rm -rf $(VENV_NAME) .coverage .coverage.* build/ dist/ htmlcov/
update-version:
@echo "$(VERSION)" > VERSION
@perl -pi -e 's|VERSION = "[.\d\w]+"|VERSION = "$(VERSION)"|' stripe/_version.py
codegen-format: fmt
.PHONY: ci-test clean codegen-format coveralls fmt fmtcheck lint test test-nomock test-travis update-version venv pyright mypy