-
-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathMakefile
72 lines (55 loc) · 1.78 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
# 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
PHONY=check check-full clean dist distclean test
GIT2CL ?= git2cl
PYTHON ?= python
PYTHON3 ?= python3
PYTEST_OPTIONS ?=
#: the default target - same as running "check"
all: check
#: Run all tests with several Python versions via tox
check-full: check
flake8 spark_parser && flake8 test \
&& flake8 example \
--exclude spark_parser/example/python2/test \
#: Run tests (one version of Python)
check:
$(PYTHON3) -m pytest $(PYTEST_OPTIONS) test
$(MAKE) -C spark_parser/example/python2 check
# $(MAKE) -C spark_parser/example/gdb-loc check
CLEAN_FILES= *.pyc *.so */*.pyc __pycache__ rm */__pycache__/ */*/__pycache__ *~ */*~
#: Clean up temporary files
clean:
$(PYTHON) ./setup.py $@
-rm -fvr $(CLEAN_FILES) || true
#: Create source (tarball) and binary (egg) distribution
dist: README.rst
$(PYTHON) ./setup.py sdist bdist
#: Create source tarball
sdist: README.rst
$(PYTHON) ./setup.py sdist
#: Create binary egg distribution
bdist_egg: README.rst
$(PYTHON) ./setup.py bdist_egg
#: Create Wheel distribution
wheel:
$(PYTHON) ./setup.py bdist_wheel
# 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 *.egg-info
#: Remove ALL dervied files
distclean: clean
-rm -fr $(DISTCLEAN_FILES) || true
#: Install package locally
install:
$(PYTHON) ./setup.py install
#: Same as 'check' target
test: check
rmChangeLog:
rm ChangeLog || true
#: Create a ChangeLog from git via git log and git2cl
ChangeLog: rmChangeLog
git log --pretty --numstat --summary | $(GIT2CL) >$@
.PHONY: $(PHONY)