Browse Source

Started on the Python frameworks

msmith-techempower 10 years ago
parent
commit
3b5e128b47

+ 1 - 0
frameworks/Python/bottle/requirements-pypy.txt

@@ -4,3 +4,4 @@ SQLAlchemy==0.9.7
 gunicorn==19.1
 PyMySQL==0.6.2
 tornado==3.2.2
+greenlet==0.4.4

+ 3 - 3
frameworks/Python/django/bash_profile.sh

@@ -1,14 +1,14 @@
-export PY2_ROOT=$TROOT/py2
+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=$TROOT/pypy
+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=$TROOT/py3
+export PY3_ROOT=$IROOT/py3
 export PY3=$PY3_ROOT/bin/python
 export PY3_PIP=$PY3_ROOT/bin/pip3
 export PY3_GUNICORN=$PY3_ROOT/bin/gunicorn

+ 2 - 4
frameworks/Python/django/install.sh

@@ -5,8 +5,6 @@ export PIP_DOWNLOAD_CACHE=$IROOT/.pip_cache
 
 fw_depends python2 python3
 
-$IROOT/py2/bin/virtualenv $TROOT/py2
-$TROOT/py2/bin/pip install -r $TROOT/requirements.txt
+$IROOT/py2/bin/pip install --install-option="--prefix=${IROOT}/py2" -r $TROOT/requirements.txt
 
-$IROOT/py3/bin/python3 -m venv $TROOT/py3
-$TROOT/py3/bin/pip install -r $TROOT/requirements.txt
+$IROOT/py3/bin/pip3 install --install-option="--prefix=${IROOT}/py3" -r $TROOT/requirements.txt

+ 2 - 0
frameworks/Python/django/requirements.txt

@@ -6,3 +6,5 @@ ujson==1.33
 
 gunicorn==19.1
 meinheld==0.5.6
+
+greenlet==0.4.4

+ 0 - 15
frameworks/Python/django/setup.py

@@ -1,15 +0,0 @@
-import subprocess
-
-
-def start(args, logfile, errfile):
-    subprocess.Popen(
-        "$PY2_GUNICORN --pid=gunicorn.pid hello.wsgi:application -c gunicorn_conf.py --env DJANGO_DB=mysql",
-        cwd="django", shell=True, stderr=errfile, stdout=logfile)
-    return 0
-
-
-def stop(logfile, errfile):
-    subprocess.call(
-        "kill `cat gunicorn.pid`",
-        cwd="django", shell=True, stderr=errfile, stdout=logfile)
-    return 0

+ 0 - 15
frameworks/Python/django/setup_pg.py

@@ -1,15 +0,0 @@
-import subprocess
-
-
-def start(args, logfile, errfile):
-    subprocess.Popen(
-        "$PY2_GUNICORN --pid=gunicorn.pid hello.wsgi:application -c gunicorn_conf.py --env DJANGO_DB=postgresql_psycopg2",
-        cwd="django", shell=True, stderr=errfile, stdout=logfile)
-    return 0
-
-
-def stop(logfile, errfile):
-    subprocess.call(
-        "kill `cat gunicorn.pid`",
-        cwd="django", shell=True, stderr=errfile, stdout=logfile)
-    return 0

+ 3 - 0
frameworks/Python/django/setup_pg.sh

@@ -0,0 +1,3 @@
+#!/bin/bash
+
+$PY2_GUNICORN --pid=gunicorn.pid hello.wsgi:application -c gunicorn_conf.py --env DJANGO_DB=postgresql_psycopg2 &

+ 0 - 15
frameworks/Python/django/setup_py3.py

@@ -1,15 +0,0 @@
-import subprocess
-
-
-def start(args, logfile, errfile):
-    subprocess.Popen(
-        "$PY3_GUNICORN --pid=gunicorn.pid hello.wsgi:application -c gunicorn_conf.py --env DJANGO_DB=mysql",
-        cwd="django", shell=True, stderr=errfile, stdout=logfile)
-    return 0
-
-
-def stop(logfile, errfile):
-    subprocess.call(
-        "kill `cat gunicorn.pid`",
-        cwd="django", shell=True, stderr=errfile, stdout=logfile)
-    return 0

+ 3 - 0
frameworks/Python/django/setup_py3.sh

@@ -0,0 +1,3 @@
+#!/bin/bash
+
+$PY3_GUNICORN --pid=gunicorn.pid hello.wsgi:application -c gunicorn_conf.py --env DJANGO_DB=mysql &

+ 1 - 1
toolset/benchmark/framework_test.py

@@ -229,7 +229,7 @@ class FrameworkTest:
     # Stop the progress printer
     stopFlag.set()
 
-    logging.info("Called setup.py start")
+    logging.info("Executed %s.sh", self.setup_file)
 
     return retcode
   ############################################################