forked from mgedmin/irclog2html
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
83 lines (57 loc) · 1.46 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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
PYTHON = python
PAGER = less -RFX
TESTFLAGS = -v
FILE_WITH_VERSION = src/irclog2html/_version.py
FILE_WITH_CHANGELOG = CHANGES.rst
scripts = bin/test bin/irclog2html bin/logs2html bin/irclogsearch bin/irclogserver
SHELL = /bin/bash -o pipefail
ifneq "$(TERM)" "dumb"
is_tty = $(shell test -t 2 && echo 1)
endif
.PHONY: default
default: all
.PHONY: all
all: $(scripts)
.PHONY: check test
check test: bin/test flake8
ifdef is_tty
bin/test $(TESTFLAGS) -c | $(PAGER)
else
bin/test $(TESTFLAGS)
endif
.PHONY: flake8 lint
flake8 lint:
flake8 src setup.py
.PHONY: test-all-pythons
test-all-pythons:
tox
.PHONY: coverage
coverage:
tox -e coverage2,coverage3
.PHONY: diff-cover
diff-cover: coverage
tox -e coverage
coverage xml
diff-cover coverage.xml
.PHONY: clean
clean:
rm -f testcases/*.html testcases/*.css
.PHONY: releasechecklist
releasechecklist: check-date # also release.mk will add other checks
include release.mk
.PHONY: check-date
check-date:
@date_line="__date__ = '`date +%Y-%m-%d`'" && \
grep -q "^$$date_line$$" $(FILE_WITH_VERSION) || { \
echo "$(FILE_WITH_VERSION) doesn't specify $$date_line"; exit 1; }
python:
virtualenv -p $(PYTHON) python
python/bin/virtualenv:
python/bin/pip install -U setuptools virtualenv
bin/buildout: python bootstrap.py
python/bin/pip install -U setuptools
python/bin/python bootstrap.py
touch -c $@
$(scripts): bin/buildout buildout.cfg setup.py python/bin/virtualenv
bin/buildout
touch -c $(scripts)