-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile
158 lines (135 loc) · 5.42 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
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
#!/bin/bash
PYTHON=/usr/bin/env python3
PACKAGE = LCONF
.PHONY: help clean_docs clean cleanall clean_force_exclude_files tests tests_cover docs build_ext build_ext_force build_force install install_develop uninstall_develop dist pypi_all check_setup cython_annotate init_versioneer code_analysis_pylint
help:
@echo 'Please use: `make <target>` where <target> is one of'
@echo ' clean_docs removes only: `build/sphinx`'
@echo ' clean clean: FILES:`.coverage, MANIFEST, *.pyc, *.pyo, *.pyd, *.o, *.orig` and DIRS: `*.__pycache__`'
@echo ' cleanall clean PLUS remove: DIRS: `build, dist, cover, *._pyxbld, *.egg-info` and FILES in MAIN_PACKAGE_PATH: `*.so, *.c` and cython annotate html'
@echo ' clean_force_exclude_files clean PLUS remove: any FILES in 'setup.py' `CleanCommand.exclude_files`'
@echo ' tests test the project build any extensions before'
@echo ' tests_cover test with coverage report: dir cover:: with cython extensions before'
@echo ' docs build the docs for the project'
@echo ' build_ext compile any extension modules if needed: using timestamps'
@echo ' build_ext_force force re-generation of all cython .c files and compile all extensions'
@echo ' build_force build the project: force re-generation of all cython .c files and compile all extension'
@echo ' install force re-compile and install the package'
@echo ' install_develop install the package in:development-mode'
@echo ' uninstall_develop uninstall the package: development-mode'
@echo ' dist force re-compile and build a source distribution tar file'
@echo ' pypi_all force re-compile and re-register/upload (inclusive docs) to pypi'
@echo ' check_setup checks the setup.py file'
@echo ' cython_annotate Cython’s code analysis'
@echo ' init_versioneer inti versioneer for the project'
@echo ' code_analysis_pylint pylint the project: ends always with an makefile error?'
clean_docs:
${PYTHON} setup.py clean --onlydocs
@echo -e '\n=== finished clean_docs'
clean:
${PYTHON} setup.py clean
@echo -e '\n=== finished clean'
cleanall:
${PYTHON} setup.py clean --all
@echo -e '\n=== finished cleanall'
clean_force_exclude_files:
${PYTHON} setup.py clean --excludefiles
@echo -e '\n=== finished clean_force_exclude_files'
tests:
${PYTHON} setup.py clean
${PYTHON} setup.py cython --timestamps
${PYTHON} setup.py build_ext --inplace
${PYTHON} setup.py clean
${PYTHON} setup.py nosetests
${PYTHON} setup.py clean
@echo -e '\n=== finished tests'
tests_cover:
${PYTHON} setup.py clean
${PYTHON} setup.py cython --timestamps
${PYTHON} setup.py build_ext --inplace
${PYTHON} setup.py clean
${PYTHON} setup.py nosetests --cover-branches --with-coverage --cover-html --cover-erase --cover-package=LCONF
${PYTHON} setup.py clean
@echo -e '\n=== finished tests_cover'
docs:
${PYTHON} setup.py clean --onlydocs
${PYTHON} setup.py build_sphinx -E
${PYTHON} setup.py clean
@echo -e '\n=== finished docs'
build_ext:
${PYTHON} setup.py clean
${PYTHON} setup.py cython --timestamps
${PYTHON} setup.py build_ext --inplace
${PYTHON} setup.py clean
@echo -e '\n=== finished build_ext'
build_ext_force:
${PYTHON} setup.py clean --all
${PYTHON} setup.py cython
${PYTHON} setup.py build_ext --inplace --force
${PYTHON} setup.py clean
@echo -e '\n=== finished build_ext_force'
build_force:
${PYTHON} setup.py clean --all
${PYTHON} setup.py cython
${PYTHON} setup.py build_ext --inplace --force
${PYTHON} setup.py build --force
${PYTHON} setup.py clean
@echo -e '\n=== finished build_force'
install:
${PYTHON} setup.py clean --all
${PYTHON} setup.py cython
${PYTHON} setup.py build_ext --inplace --force
${PYTHON} setup.py build --force
${PYTHON} setup.py install
${PYTHON} setup.py clean
@echo -e '\n=== finished install'
install_develop:
${PYTHON} setup.py clean --all
${PYTHON} setup.py cython
${PYTHON} setup.py build_ext --inplace --force
${PYTHON} setup.py develop --exclude-scripts
${PYTHON} setup.py clean
@echo -e '\n=== finished install_develop'
uninstall_develop:
${PYTHON} setup.py develop --uninstall
${PYTHON} setup.py clean
@echo -e '\n=== finished uninstall_develop'
dist:
# just to make sure it compiles
${PYTHON} setup.py clean --all
${PYTHON} setup.py cython
${PYTHON} setup.py build_ext --inplace --force
# do it
${PYTHON} setup.py clean --all
${PYTHON} setup.py cython
${PYTHON} setup.py sdist
${PYTHON} setup.py clean
@echo -e '\n=== finished dist'
pypi_all:
# just to make sure it compiles
${PYTHON} setup.py clean --all
${PYTHON} setup.py cython
${PYTHON} setup.py build_ext --inplace --force
# do it
${PYTHON} setup.py clean --all
${PYTHON} setup.py cython
${PYTHON} setup.py check
${PYTHON} setup.py register
${PYTHON} setup.py sdist upload
${PYTHON} setup.py build_sphinx upload_docs
${PYTHON} setup.py clean
@echo -e '\n=== finished pypi_all'
check_setup:
${PYTHON} setup.py clean
${PYTHON} setup.py check
${PYTHON} setup.py clean
@echo -e '\n=== finished check_setup'
cython_annotate:
${PYTHON} setup.py cython --annotate
@echo -e '\n=== finished cython_annotate'
init_versioneer:
${PYTHON} setup.py versioneer
@echo -e '\n=== finished init_versioneer'
code_analysis_pylint:
pylint -f colorized LCONF
@echo -e '\n=== finished code_analysis_pylint'