forked from stripe/stripe-python
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
45 lines (32 loc) · 1.12 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
VENV_NAME?=venv
PIP?=pip
PYTHON?=python
venv: $(VENV_NAME)/bin/activate
$(VENV_NAME)/bin/activate: setup.py
$(PIP) install --upgrade pip virtualenv
@test -d $(VENV_NAME) || $(PYTHON) -m virtualenv --clear $(VENV_NAME)
${VENV_NAME}/bin/python -m pip install -U pip tox twine
${VENV_NAME}/bin/python -m pip install -e .
@touch $(VENV_NAME)/bin/activate
test: venv
@${VENV_NAME}/bin/tox -p auto $(TOX_ARGS)
test-nomock: venv
@${VENV_NAME}/bin/tox -p auto -- --nomock $(TOX_ARGS)
test-gh-actions: venv
${VENV_NAME}/bin/python -m pip install -U tox-gh-actions
@${VENV_NAME}/bin/tox -p auto $(TOX_ARGS)
coveralls: venv
@${VENV_NAME}/bin/tox -e coveralls
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: clean codegen-format coveralls fmt fmtcheck lint test test-nomock test-travis update-version venv