forked from jsonpickle/jsonpickle
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
62 lines (50 loc) · 1.06 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
#!/usr/bin/env make
# External commands
CTAGS ?= ctags
FIND ?= find
PYTHON ?= python
PYTEST ?= $(PYTHON) -m pytest
RM_R ?= rm -fr
SH ?= sh
TOX ?= tox
# Options
flags ?=
timeout ?= 600
TESTCMD ?= $(PYTEST) --doctest-modules $(flags)
TOXCMD ?= $(TOX) --develop --skip-missing-interpreters
ifdef V
TESTCMD += --verbose
TOXCMD += --verbose
endif
# Data
ARTIFACTS := build
ARTIFACTS += dist
ARTIFACTS += tags
ARTIFACTS += *.egg-info
PYTHON_DIRS := tests
PYTHON_DIRS += jsonpickle
# The default target of this makefile is....
all:: help
help:
@echo "================"
@echo "Makefile Targets"
@echo "================"
@echo "make help - print this message"
@echo "make test - run unit tests"
@echo "make clean - remove cruft"
.PHONY: help
test:
$(TESTCMD) $(PYTHON_DIRS)
.PHONY: test
tox:
$(TOXCMD) $(flags)
.PHONY: tox
check:
$(TOXCMD) -e flake8 $(flags)
.PHONY: check
tags:
$(FIND) $(PYTHON_DIRS) -name '*.py' -print0 | xargs -0 $(CTAGS) -f tags
clean:
$(FIND) $(PYTHON_DIRS) -name '*.py[cod]' -print0 | xargs -0 rm -f
$(RM_R) $(ARTIFACTS)
.PHONY: clean