-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
32 lines (31 loc) · 1.77 KB
/
setup.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
#!/usr/bin/python2.7
import os, subprocess, sys
isflaskdir_exist = os.path.exists('requirements.txt')
if isflaskdir_exist:
subprocess.call(['rm','-fr','flask'])
subprocess.call(['python2.7', 'virtualenv.py', 'flask'])
if sys.platform == 'win32':
bin = 'Scripts'
else:
bin = 'bin'
# subprocess.call(['source', os.path.join('flask', bin, 'activate')])
isexist_requirements = os.path.exists('requirements.txt')
if isexist_requirements:
subprocess.call([os.path.join('flask', bin, 'pip'), 'install', '-r', 'requirements.txt'])
else:
subprocess.call([os.path.join('flask', bin, 'pip'), 'install', 'flask<0.10'])
subprocess.call([os.path.join('flask', bin, 'pip'), 'install', 'flask-login'])
subprocess.call([os.path.join('flask', bin, 'pip'), 'install', 'flask-openid'])
if sys.platform == 'win32':
subprocess.call([os.path.join('flask', bin, 'pip'), 'install', '--no-deps', 'lamson', 'chardet', 'flask-mail'])
else:
subprocess.call([os.path.join('flask', bin, 'pip'), 'install', 'flask-mail'])
subprocess.call([os.path.join('flask', bin, 'pip'), 'install', 'sqlalchemy==0.7.9'])
subprocess.call([os.path.join('flask', bin, 'pip'), 'install', 'flask-sqlalchemy'])
subprocess.call([os.path.join('flask', bin, 'pip'), 'install', 'sqlalchemy-migrate'])
subprocess.call([os.path.join('flask', bin, 'pip'), 'install', 'flask-whooshalchemy'])
subprocess.call([os.path.join('flask', bin, 'pip'), 'install', 'flask-wtf'])
subprocess.call([os.path.join('flask', bin, 'pip'), 'install', 'flask-babel'])
subprocess.call([os.path.join('flask', bin, 'pip'), 'install', 'flup'])
subprocess.call([os.path.join('flask', bin, 'pip'), 'install', 'guess-language-spirit'])
subprocess.call([os.path.join('flask', bin, 'pip'), 'install', 'coverage'])