import os, subprocess, sys
subprocess.call(['python', 'virtualenv.py', 'flask'])
if sys.platform == 'win32':
    bin = 'Scripts'
else:
    bin = 'bin'
subprocess.call([os.path.join('flask', bin, 'pip'), 'install', 'Flask==0.10.1'])
subprocess.call([os.path.join('flask', bin, 'pip'), 'install', 'Flask-Login==0.2.9'])
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==0.9.0'])
subprocess.call([os.path.join('flask', bin, 'pip'), 'install', 'flup==1.0.2'])
subprocess.call([os.path.join('flask', bin, 'pip'), 'install', 'Babel==1.3'])
subprocess.call([os.path.join('flask', bin, 'pip'), 'install', 'Flask-Assets==0.9'])
subprocess.call([os.path.join('flask', bin, 'pip'), 'install', 'Flask-Babel==0.9'])
subprocess.call([os.path.join('flask', bin, 'pip'), 'install', 'Flask-Bootstrap==3.1.1.2'])
subprocess.call([os.path.join('flask', bin, 'pip'), 'install', 'Flask-OAuthlib==0.4.3'])
subprocess.call([os.path.join('flask', bin, 'pip'), 'install', 'Flask-OpenID==1.2.1'])
subprocess.call([os.path.join('flask', bin, 'pip'), 'install', 'Flask-SQLAlchemy==1.0'])
subprocess.call([os.path.join('flask', bin, 'pip'), 'install', 'Flask-User==0.4.9'])
subprocess.call([os.path.join('flask', bin, 'pip'), 'install', 'Flask-WTF==0.8.4'])
subprocess.call([os.path.join('flask', bin, 'pip'), 'install', 'Flask-WhooshAlchemy==0.55'])
subprocess.call([os.path.join('flask', bin, 'pip'), 'install', 'Jinja2==2.7.2'])
subprocess.call([os.path.join('flask', bin, 'pip'), 'install', 'MarkupSafe==0.19'])
subprocess.call([os.path.join('flask', bin, 'pip'), 'install', 'SQLAlchemy==0.9.3'])
subprocess.call([os.path.join('flask', bin, 'pip'), 'install', 'Tempita==0.5.2'])
subprocess.call([os.path.join('flask', bin, 'pip'), 'install', 'WTForms==1.0.4'])
subprocess.call([os.path.join('flask', bin, 'pip'), 'install', 'Werkzeug==0.9.4'])
subprocess.call([os.path.join('flask', bin, 'pip'), 'install', 'Whoosh==2.6.0'])
subprocess.call([os.path.join('flask', bin, 'pip'), 'install', 'WhooshAlchemy==0.1.4'])
subprocess.call([os.path.join('flask', bin, 'pip'), 'install', 'argparse==1.2.1'])
subprocess.call([os.path.join('flask', bin, 'pip'), 'install', 'blinker==1.3'])
subprocess.call([os.path.join('flask', bin, 'pip'), 'install', 'decorator==3.4.0'])
subprocess.call([os.path.join('flask', bin, 'pip'), 'install', 'itsdangerous==0.23'])
subprocess.call([os.path.join('flask', bin, 'pip'), 'install', 'mechanize==0.2.5'])
subprocess.call([os.path.join('flask', bin, 'pip'), 'install', 'oauthlib==0.6.1'])
subprocess.call([os.path.join('flask', bin, 'pip'), 'install', 'passlib==1.6.2'])
subprocess.call([os.path.join('flask', bin, 'pip'), 'install', 'pbr==0.6'])
subprocess.call([os.path.join('flask', bin, 'pip'), 'install', 'py-bcrypt==0.4'])
subprocess.call([os.path.join('flask', bin, 'pip'), 'install', 'pycrypto==2.6.1'])
subprocess.call([os.path.join('flask', bin, 'pip'), 'install', 'python-openid==2.2.5'])
subprocess.call([os.path.join('flask', bin, 'pip'), 'install', 'pytz==2014.2'])
subprocess.call([os.path.join('flask', bin, 'pip'), 'install', 'requests==2.2.1'])
subprocess.call([os.path.join('flask', bin, 'pip'), 'install', 'six==1.5.2'])
subprocess.call([os.path.join('flask', bin, 'pip'), 'install', 'speaklater==1.3'])
subprocess.call([os.path.join('flask', bin, 'pip'), 'install', 'sqlalchemy-migrate==0.9'])
subprocess.call([os.path.join('flask', bin, 'pip'), 'install', 'webassets==0.9'])
subprocess.call([os.path.join('flask', bin, 'pip'), 'install', 'wsgiref==0.1.2'])

# subprocess.call([os.path.join('flask', bin, 'pip'), 'install', 'Flask-Login==0.2.9'])
# subprocess.call([os.path.join('flask', bin, 'pip'), 'install', 'Flask-Mail==0.9.0'])
