Browse Source

Fix tornado

Hamilton Turner 11 years ago
parent
commit
d19d5524ca
4 changed files with 22 additions and 23 deletions
  1. 16 0
      tornado/bash_profile.sh
  2. 2 7
      tornado/setup.py
  3. 2 9
      tornado/setup_pg.py
  4. 2 7
      tornado/setup_py3.py

+ 16 - 0
tornado/bash_profile.sh

@@ -0,0 +1,16 @@
+
+export PY2_ROOT=$IROOT/py2
+export PY2=$PY2_ROOT/bin/python
+export PY2_PIP=$PY2_ROOT/bin/pip
+export PY2_GUNICORN=$PY2_ROOT/bin/gunicorn
+
+export PYPY_ROOT=$IROOT/pypy
+export PYPY=$PYPY_ROOT/bin/python
+export PYPY_PIP=$PYPY_ROOT/bin/pip
+export PYPY_GUNICORN=$PYPY_ROOT/bin/gunicorn
+
+export PY3_ROOT=$IROOT/py3
+export PY3=$PY3_ROOT/bin/python
+export PY3_PIP=$PY3_ROOT/bin/pip
+export PY3_GUNICORN=$PY3_ROOT/bin/gunicorn
+

+ 2 - 7
tornado/setup.py

@@ -5,14 +5,9 @@ import sys
 import time
 import time
 
 
 
 
-python = expanduser('~/FrameworkBenchmarks/installs/py2/bin/python')
-cwd = expanduser('~/FrameworkBenchmarks/tornado')
-
-
 def start(args, logfile, errfile):
 def start(args, logfile, errfile):
-    subprocess.Popen(
-        python + " server.py --port=8080 --mongo=%s --logging=error" % (args.database_host,),
-        shell=True, cwd=cwd, stderr=errfile, stdout=logfile)
+    subprocess.Popen("$PY2 server.py --port=8080 --mongo=%s --logging=error" % (args.database_host,),
+        shell=True, cwd='tornado', stderr=errfile, stdout=logfile)
     return 0
     return 0
 
 
 def stop(logfile, errfile):
 def stop(logfile, errfile):

+ 2 - 9
tornado/setup_pg.py

@@ -4,16 +4,9 @@ import sys
 import time
 import time
 
 
 
 
-bin_dir = os.path.expanduser('~/FrameworkBenchmarks/installs/py2/bin')
-python = os.path.expanduser(os.path.join(bin_dir, 'python'))
-pip = os.path.expanduser(os.path.join(bin_dir, 'pip'))
-cwd = os.path.expanduser('~/FrameworkBenchmarks/tornado')
-
-
 def start(args, logfile, errfile):
 def start(args, logfile, errfile):
-    subprocess.Popen(
-        python + ' server.py --port=8080 --postgres=%s --logging=error' % (args.database_host,),
-        shell=True, cwd=cwd, stderr=errfile, stdout=logfile)
+    subprocess.Popen('$PY2 server.py --port=8080 --postgres=%s --logging=error' % (args.database_host,),
+        shell=True, cwd='tornado', stderr=errfile, stdout=logfile)
     return 0
     return 0
 
 
 
 

+ 2 - 7
tornado/setup_py3.py

@@ -5,14 +5,9 @@ import sys
 import time
 import time
 
 
 
 
-python = expanduser('~/FrameworkBenchmarks/installs/py3/bin/python3')
-cwd = expanduser('~/FrameworkBenchmarks/tornado')
-
-
 def start(args, logfile, errfile):
 def start(args, logfile, errfile):
-    subprocess.Popen(
-        python + " server.py --port=8080 --mongo=%s --logging=error" % (args.database_host,),
-        shell=True, cwd=cwd, stderr=errfile, stdout=logfile)
+    subprocess.Popen("$PY3 server.py --port=8080 --mongo=%s --logging=error" % (args.database_host,),
+        shell=True, cwd='tornado', stderr=errfile, stdout=logfile)
     return 0
     return 0
 
 
 def stop(logfile, errfile):
 def stop(logfile, errfile):