forked from nedbat/byterun
-
-
Notifications
You must be signed in to change notification settings - Fork 17
Expand file tree
/
Copy pathMakefile
More file actions
96 lines (73 loc) · 2.4 KB
/
Makefile
File metadata and controls
96 lines (73 loc) · 2.4 KB
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
# 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
SHELL ?= bash
SKIP_COMPAT ?= 1
.PHONY: all check check-compat check-full clean unittest dist distclean lint flake8 test rmChangeLog clean_pyc
#: Default target - same as "check"
all: check
# Run all tests, excluding those that need pyenv
check:
test -f test/.python-version && rm -v test/.python-version || true
$(MAKE) -C test check
#: Check across all Python versions
check-full:
SKIP_COMPAT=$(SKIP_COMPAT) bash ./admin-tools/check-newest-versions.sh
# There is a bug somewhere that causes check-compat not to run
# when run with the other tests.
#: Check across all Python versions
check-compat:
(cd test && ./test-compat.sh)
#: Clean up temporary files and .pyc files
clean: clean_pyc
find . -name __pycache__ -exec rm -fr {} \; || true
#: Create source (tarball) and wheel distribution
dist: clean
bash ./admin-tools/make-dist.sh
#: Remove .pyc files
clean_pyc:
( cd xpython && $(RM) -f *.pyc */*.pyc )
( cd test && $(RM) -f *.pyc )
#: Create source tarball
sdist:
$(PYTHON) ./setup.py sdist
#: Style check. Set env var LINT to pyflakes, flake, or flake8
lint: flake8
#: Check StructuredText long description formatting
check-rst:
$(PYTHON) setup.py --long-description | rst2html.py > x-python.html
#: Lint program
flake8:
$(LINT) xpython
#: Create binary egg distribution
bdist_egg:
$(PYTHON) ./setup.py bdist_egg
#: Create binary wheel distribution
bdist_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 *.pyc
#: Remove ALL derived files
distclean: clean
-rm -fvr $(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
rmChangeLog:
rm ChangeLog || true
#: Create a ChangeLog from git via git log and git2cl
ChangeLog: rmChangeLog
git log --pretty --numstat --summary | $(GIT2CL) >$@
patch ChangeLog < ChangeLog-spell-corrected.diff