Browse Source

Fixed bottle tests

msmith-techempower 10 years ago
parent
commit
6eb7db075d

+ 1 - 1
frameworks/Nimrod/nawak/setup.sh

@@ -2,7 +2,7 @@
 
 
 sed -i 's|host=.* port=5432|host='"${DBHOST}"' port=5432|g' model_postgre.nim
 sed -i 's|host=.* port=5432|host='"${DBHOST}"' port=5432|g' model_postgre.nim
 
 
-export PATH=$NIMROD_HOME/bin:$NAWAK_HOME/bin:$ZEROMQ_HOME/include:$PATH
+export PATH=$NIMROD_HOME/bin:$NAWAK_HOME/bin:$ZEROMQ_HOME/include:$NAWAK_PATH:$PATH
 
 
 nim c --threads:on -d:release -d:postgre_model --path:$NAWAK_PATH -o:nawak_postgre app.nim
 nim c --threads:on -d:release -d:postgre_model --path:$NAWAK_PATH -o:nawak_postgre app.nim
 
 

+ 3 - 3
frameworks/Python/bottle/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=$PY2_ROOT/bin/python
 export PY2_PIP=$PY2_ROOT/bin/pip
 export PY2_PIP=$PY2_ROOT/bin/pip
 export PY2_GUNICORN=$PY2_ROOT/bin/gunicorn
 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=$PYPY_ROOT/bin/python
 export PYPY_PIP=$PYPY_ROOT/bin/pip
 export PYPY_PIP=$PYPY_ROOT/bin/pip
 export PYPY_GUNICORN=$PYPY_ROOT/bin/gunicorn
 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=$PY3_ROOT/bin/python
 export PY3_PIP=$PY3_ROOT/bin/pip
 export PY3_PIP=$PY3_ROOT/bin/pip
 export PY3_GUNICORN=$PY3_ROOT/bin/gunicorn
 export PY3_GUNICORN=$PY3_ROOT/bin/gunicorn

+ 3 - 6
frameworks/Python/bottle/install.sh

@@ -5,11 +5,8 @@ export PIP_DOWNLOAD_CACHE=$IROOT/.pip_cache
 
 
 fw_depends python2 python3 pypy nginx
 fw_depends python2 python3 pypy nginx
 
 
-$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
 
 
-$IROOT/pypy/bin/virtualenv $TROOT/pypy
-$TROOT/pypy/bin/pip install -r $TROOT/requirements-pypy.txt
+$IROOT/pypy/bin/pip install --install-option="--prefix=${IROOT}/pypy" -r $TROOT/requirements-pypy.txt

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

@@ -4,4 +4,5 @@ SQLAlchemy==0.9.4
 gunicorn==19.1
 gunicorn==19.1
 meinheld==0.5.6
 meinheld==0.5.6
 mysqlclient==1.3.1
 mysqlclient==1.3.1
+greenlet==0.4.4
 uwsgi
 uwsgi

+ 1 - 1
frameworks/Python/bottle/setup.sh

@@ -1,3 +1,3 @@
 #!/bin/bash
 #!/bin/bash
 
 
-$PY2_GUNICORN app:app -c gunicorn_conf.py
+$PY2_GUNICORN app:app -c gunicorn_conf.py &

+ 1 - 1
frameworks/Python/bottle/setup_py3.sh

@@ -1,3 +1,3 @@
 #!/bin/bash
 #!/bin/bash
 
 
-$PY3_GUNICORN app:app -c gunicorn_conf.py
+$PY3_GUNICORN app:app -c gunicorn_conf.py &

+ 1 - 1
frameworks/Python/bottle/setup_pypy.sh

@@ -1,3 +1,3 @@
 #!/bin/bash
 #!/bin/bash
 
 
-$PYPY_GUNICORN app:app -c gunicorn_conf.py
+$PYPY_GUNICORN app:app -c gunicorn_conf.py &

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

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

+ 4 - 3
toolset/setup/linux/languages/pypy.sh

@@ -1,6 +1,6 @@
 #!/bin/bash
 #!/bin/bash
 
 
-RETCODE=$(fw_exists pypy)
+RETCODE=$(fw_exists ${IROOT}/pypy.installed)
 [ ! "$RETCODE" == 0 ] || { return 0; }
 [ ! "$RETCODE" == 0 ] || { return 0; }
 
 
 fw_get https://bitbucket.org/pypy/pypy/downloads/pypy-2.3.1-linux64.tar.bz2 -O pypy-2.3.1-linux64.tar.bz2
 fw_get https://bitbucket.org/pypy/pypy/downloads/pypy-2.3.1-linux64.tar.bz2 -O pypy-2.3.1-linux64.tar.bz2
@@ -10,5 +10,6 @@ ln -sf pypy-2.3.1-linux64 pypy
 if [ ! -f "get-pip.py" ]; then
 if [ ! -f "get-pip.py" ]; then
 fw_get https://bootstrap.pypa.io/get-pip.py -O get-pip.py
 fw_get https://bootstrap.pypa.io/get-pip.py -O get-pip.py
 fi
 fi
-./pypy/bin/pypy get-pip.py
-./pypy/bin/pip install virtualenv
+${IROOT}/pypy/bin/pypy get-pip.py
+
+touch ${IROOT}/pypy.installed

+ 6 - 6
toolset/setup/linux/languages/python2.sh

@@ -1,19 +1,19 @@
 #!/bin/bash
 #!/bin/bash
 
 
-RETCODE=$(fw_exists py2)
+RETCODE=$(fw_exists ${IROOT}/py2.installed)
 [ ! "$RETCODE" == 0 ] || { return 0; }
 [ ! "$RETCODE" == 0 ] || { return 0; }
 
 
 fw_get http://www.python.org/ftp/python/2.7.8/Python-2.7.8.tgz
 fw_get http://www.python.org/ftp/python/2.7.8/Python-2.7.8.tgz
 fw_untar Python-2.7.8.tgz
 fw_untar Python-2.7.8.tgz
-pre=$(pwd)
 cd Python-2.7.8
 cd Python-2.7.8
-./configure --prefix=${pre}/py2 --disable-shared --quiet
+./configure --prefix=${IROOT}/py2 --disable-shared --quiet
 make -j4 --quiet
 make -j4 --quiet
 make install --quiet
 make install --quiet
-cd ..
 
 
+cd ..
 if [ ! -f "get-pip.py" ]; then
 if [ ! -f "get-pip.py" ]; then
 fw_get https://bootstrap.pypa.io/get-pip.py -O get-pip.py
 fw_get https://bootstrap.pypa.io/get-pip.py -O get-pip.py
 fi
 fi
-./py2/bin/python get-pip.py
-./py2/bin/pip install virtualenv
+${IROOT}/py2/bin/python get-pip.py
+
+touch ${IROOT}/py2.installed

+ 4 - 4
toolset/setup/linux/languages/python3.sh

@@ -1,13 +1,13 @@
 #!/bin/bash
 #!/bin/bash
 
 
-RETCODE=$(fw_exists py3)
+RETCODE=$(fw_exists ${IROOT}/py3.installed)
 [ ! "$RETCODE" == 0 ] || { return 0; }
 [ ! "$RETCODE" == 0 ] || { return 0; }
 
 
 fw_get http://www.python.org/ftp/python/3.4.2/Python-3.4.2.tar.xz
 fw_get http://www.python.org/ftp/python/3.4.2/Python-3.4.2.tar.xz
 fw_untar Python-3.4.2.tar.xz
 fw_untar Python-3.4.2.tar.xz
-pre=$(pwd)
 cd Python-3.4.2
 cd Python-3.4.2
-./configure --prefix=${pre}/py3 --disable-shared --quiet
+./configure --prefix=${IROOT}/py3 --disable-shared --quiet
 make -j4 --quiet
 make -j4 --quiet
 make install --quiet
 make install --quiet
-cd ..
+
+touch ${IROOT}/py3.installed