-
Notifications
You must be signed in to change notification settings - Fork 44
/
Copy pathMakefile
89 lines (66 loc) · 2.09 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
# --- Detecting OS
ifeq '$(findstring ;,$(PATH))' ';'
detected_OS := Windows
else
detected_OS := $(shell uname 2>/dev/null || echo Unknown)
detected_OS := $(patsubst CYGWIN%,Cygwin,$(detected_OS))
detected_OS := $(patsubst MSYS%,MSYS,$(detected_OS))
detected_OS := $(patsubst MINGW%,MSYS,$(detected_OS))
endif
testfile= example_files/FASTIn_arf_coords.txt
all:
ifeq ($(detected_OS),Darwin) # Mac OS X
./pythonmac pyDatView.py $(testfile)
else
python pyDatView.py $(testfile)
endif
deb:
python DEBUG.py
install:
python setup.py install
dep:
python -m pip install -r requirements.txt
pull:
git pull --recurse-submodules
update:pull
help:
@echo "Available rules:"
@echo " all run the standalone program"
@echo " install install the python package in the system"
@echo " dep download the dependencies "
@echo " pull download the latest version "
@echo " test run the unit tests "
test:
ifeq ($(detected_OS),Darwin) # Mac OS X
./pythonmac -m unittest discover -v tests
./pythonmac -m unittest discover -v pydatview/plugins/tests
else
python -m unittest discover -v tests
python -m unittest discover -v pydatview/plugins/tests
endif
prof:
python -m cProfile -o tests/prof_all.prof tests/prof_all.py
python -m pyprof2calltree -i tests/prof_all.prof -o tests/callgrind.prof_all.prof
snakeviz tests/prof_all.prof
#viztracer .\tests\prof_all.py
#vizviewer.exe .\result.json
exe:
python -m nuitka --follow-imports --include-plugin-directory --include-plugin-files --show-progress --show-modules --output-dir=build-nuitka pyDatView.py
exestd:
python -m nuitka --python-flag=no_site --assume-yes-for-downloads --standalone --follow-imports --include-plugin-directory --include-plugin-files --show-progress --show-modules --output-dir=build-nuitka-std pyDatView.py
clean:
rm -rf __pycache__
rm -rf *.egg-info
rm -rf *.spec
rm -rf build*
rm -rf dist
pyexe:
pyinstaller --onedir pyDatView.py
version:
ifeq ($(OS),Windows_NT)
@echo "Doing nothing"
else
@sh _tools/setVersion.sh
endif
installer:
python -m nsist installer.cfg