Created
April 7, 2016 14:08
-
-
Save jbolda/bf9a9f056c2849e4f4af01c9186e194d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Flask==0.10.1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-r common.txt |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-r common.txt | |
gunicorn==18.0 | |
lamson==1.3.4 | |
psycopg2==2.5.4 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# we are pulling out of a requirements.tx file setup with a folder structure | |
import os, subprocess, sys, shutil | |
f = open("setup-out.txt", "w") | |
try: | |
shutil.rmtree('vpython', True) | |
except: | |
pass | |
subprocess.call(['pip', 'install', '--upgrade', 'pip'], stdout=f, stderr=f) | |
subprocess.call(['pip', 'install', '--upgrade', 'setuptools'], stdout=f, stderr=f) | |
subprocess.call(['pip', 'install', '--upgrade', 'virtualenv'], stdout=f, stderr=f) | |
subprocess.call(['virtualenv', 'vpython'], stdout=f, stderr=f) | |
if sys.platform == 'win32': | |
bin = 'Scripts' | |
else: | |
bin = 'bin' | |
subprocess.call([os.path.join('vpython', bin, 'pip'), 'install', '-r', 'requirements/local.txt'], stdout=f, stderr=f) | |
try: | |
os.remove('app.db') | |
except: | |
pass | |
subprocess.call([os.path.join('vpython', bin, 'alembic'), 'upgrade', 'head'], stdout=f, stderr=f) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment