-
Notifications
You must be signed in to change notification settings - Fork 0
/
install.py
49 lines (40 loc) · 1.21 KB
/
install.py
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
import os
import sys
from subprocess import call
python_version = sys.version_info.major
if not python_version == 3:
print("Requires python 3")
sys.exit(1)
try:
call(["pip3"])
except:
print("Pip must be installed. Please install pip before continuing")
sys.exit(1)
try:
print("Installing python dependencies. If there are any errors...well...")
call(["pip3", "install", "-r", "requirements.txt"])
except:
print("Error install python dependencies. Please ensure pip is correctly installed")
sys.exit(1)
os.chdir("app/static")
try:
call(["node", "--version"])
except:
print("This requires node js to be installed. Please install node before continuing")
sys.exit(1)
try:
call(["npm", "--help"])
except:
print("This requires npm to be installed. Please install npm before continuing")
sys.exit(1)
try:
call(["bower", "--help"])
except:
print("This requires bower to be installed. Installing now")
call(["npm", "-g", "install", "bower"])
print("Installing global libraries with NPM...")
call(["npm", "install", "-g", "nodemon", "node-sass"])
print("Installing npm project dependencies")
call(["npm", "install"])
print("Should be good to go!")
# comment so I can push