-
Notifications
You must be signed in to change notification settings - Fork 12
/
Makefile
121 lines (89 loc) · 2.94 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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
# Compatibility for us old-timers.
# Note: This makefile include remake-style target comments.
# These comments before the targets start with #:
# remake --tasks to shows the targets and the comments
GIT2CL ?= git2cl
PYTHON ?= python
PYTHON3 ?= python3
RM ?= rm
LINT = flake8
#EXTRA_DIST=ipython/ipy_trepan.py trepan
PHONY=check clean dist distclean test test-unit test-functional rmChangeLog clean_pyc nosetests
#: Default target - same as "check"
all: check
#: Make HTML docs
html:
cd docs && $(MAKE) html
#: Same as "check"
test: check
#: Same as "check"
nosetests: check
#: Run all tests: unit, functional and integration
check-short: test-unit-short test-functional-short test-integration-short
# Check StructuredText long description formatting
check-rst:
$(PYTHON) setup.py --long-description | ./rst2html.py > python2-trepan.html
#: Run all tests: unit, functional and integration verbosely
check: test-unit test-functional test-integration
#: Run unit (white-box) tests
test-unit:
$(PYTHON) ./setup.py nosetests
#: Run unit (white-box) tests
test-unit-short:
$(PYTHON) ./setup.py nosetests --quiet 2>&1 | \
$(PYTHON) ./test/make-check-filter.py
#: Run functional tests
test-functional:
(cd test/functional && $(PYTHON) ./setup.py nosetests 2>&1)
#: Run functional tests
test-functional-short:
(cd test/functional && $(PYTHON) ./setup.py nosetests --quiet) | \
$(PYTHON) ./test/make-check-filter.py
#: Run integration (black-box) tests
test-integration:
(cd test/integration && $(PYTHON) ./setup.py nosetests)
#: Run integration (black-box) tests
test-integration-short:
(cd test/integration && $(PYTHON) ./setup.py nosetests) 2>&1 | \
$(PYTHON) ./test/make-check-filter.py
#: Clean up temporary files and .pyc files
clean: clean_pyc
$(PYTHON) ./setup.py $@
#: Create source (tarball) and binary (egg) distribution
dist: check-rst
bash ./admin-tools/make-dist.sh
#: Remove .pyc files
clean_pyc:
$(RM) -f */*.pyc */*/*.pyc */*/*/*.pyc */*/*/*/*.pyc
#: Create source tarball
sdist: check-rst
$(PYTHON) ./setup.py sdist
#: Style check. Set env var LINT to pyflakes, flake, or flake8
lint:
$(LINT) trepan
#: Create binary egg distribution
bdist_egg:
$(PYTHON) ./setup.py bdist_egg
# It is too much work to figure out how to add a new command to distutils
# to do the following. I'm sure distutils will someday get there.
DISTCLEAN_FILES = build dist *.pyc
#: Remove ALL derived files
distclean: clean
-rm -fr $(DISTCLEAN_FILES) || true
-find . -name \*.pyc -exec rm -v {} \;
-find . -name \*.egg-info -exec rm -vr {} \;
#: Install package locally
verbose-install:
$(PYTHON) ./setup.py install
#: Install package locally without the verbiage
install:
$(PYTHON) ./setup.py install >/dev/null
#: Install setup.py requirements
install-requirements:
pip install -e .
rmChangeLog:
rm ChangeLog || true
#: Create a ChangeLog from git via git log and git2cl
ChangeLog: rmChangeLog
git log --pretty --numstat --summary | $(GIT2CL) >$@
.PHONY: $(PHONY)