forked from lscad-facom-ufms/multiexplorer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmakefile
72 lines (63 loc) · 1.64 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
all: install check config test
install:
ifneq ($(shell id -u), 0)
@echo "You are not root, \"make install\" should be run as root"
exit 1
endif
apt update
apt install -y python2.7
ifeq (,$(shell ls /usr/bin/ | grep -w "python"$))
ln -s /usr/bin/python2.7 /usr/bin/python
endif
apt install -y wget
ifeq (,$(shell ls | grep get-pip))
wget https://bootstrap.pypa.io/pip/2.7/get-pip.py
endif
python get-pip.py
pip2 install -r requirements.txt
apt install -y python-tk
make -f MakeSniper
config:
ifeq (,$(shell ls MultiExplorer/src/ | grep config.py))
cp MultiExplorer/src/config.example.py MultiExplorer/src/config.py
else
@echo "MultiExplorer/src/config.py already found, make sure it's properly set."
endif
ifeq (,$(shell ls -a | grep -w "\.env"))
cp example.env .env
else
@echo ".env already found, make sure it's properly set."
endif
test:
python ME.py
python2-check:
ifeq (,$(shell which python2))
@printf 'python2 \xE2\x9C\x95\n'
else
@printf 'python2 \xE2\x9C\x93\n'
endif
pip2-check:
ifeq (,$(shell which pip2))
@printf 'pip2 \xE2\x9C\x95\n'
else
@printf 'pip2 \xE2\x9C\x93\n'
endif
lxml-check:
ifeq (,$(shell pip2 freeze 2>/dev/null | grep lxml))
@printf 'lxml \xE2\x9C\x95\n'
else
@printf 'lxml \xE2\x9C\x93\n'
endif
configparser-check:
ifeq (,$(shell pip2 freeze 2>/dev/null | grep configparser))
@printf 'configparser \xE2\x9C\x95\n'
else
@printf 'configparser \xE2\x9C\x93\n'
endif
scikit-check:
ifeq (,$(shell pip2 freeze 2>/dev/null| grep scikit-learn==0.19.1))
@printf 'scikit-learn==0.19.1 \xE2\x9C\x95\n'
else
@printf 'scikit-learn 0.19.1\xE2\x9C\x93\n'
endif
check:python2-check pip2-check lxml-check configparser-check scikit-check