Browse Source

Merge pull request #1263 from methane/python-update

Python: Update Python 2 and PyPy
Hamilton Turner 10 years ago
parent
commit
6b68818110

+ 2 - 0
frameworks/Python/.gitignore

@@ -0,0 +1,2 @@
+uwsgi_params
+*.pid

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

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

+ 2 - 2
frameworks/Python/bottle/requirements.txt

@@ -2,7 +2,7 @@ bottle==0.12.7
 bottle-sqlalchemy==0.4.1
 SQLAlchemy==0.9.4
 gunicorn==19.1
-meinheld==0.5.6
+meinheld==0.5.7
 mysqlclient==1.3.1
-greenlet==0.4.4
+greenlet==0.4.5
 uwsgi

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

@@ -3,4 +3,4 @@
 sed -i 's|include .*/conf/uwsgi_params;|include '"${NGINX_HOME}"'/conf/uwsgi_params;|g' nginx.conf
 
 ${NGINX_HOME}/sbin/nginx -c ${TROOT}/nginx.conf
-${PY2_ROOT}/bin/uwsgi --ini ${TROOT}/uwsgi.ini --processes ${MAX_THREADS} --wsgi app:app &
+${PY2_ROOT}/bin/uwsgi -d --ini ${TROOT}/uwsgi.ini --processes ${MAX_THREADS} --wsgi app:app

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

@@ -5,6 +5,6 @@ psycopg2==2.5.3
 ujson==1.33
 
 gunicorn==19.1
-meinheld==0.5.6
+meinheld==0.5.7
 
-greenlet==0.4.4
+greenlet==0.4.5

+ 2 - 2
frameworks/Python/falcon/requirements.txt

@@ -1,6 +1,6 @@
 gunicorn==19.1
-meinheld==0.5.6
+meinheld==0.5.7
 Cython==0.20.1
 falcon==0.1.9
 
-greenlet==0.4.4
+greenlet==0.4.5

+ 2 - 2
frameworks/Python/flask/requirements.txt

@@ -5,7 +5,7 @@ SQLAlchemy==0.9.7
 Flask-SQLAlchemy==1.0
 mysqlclient==1.3.1
 gunicorn==19.1
-meinheld==0.5.6
+meinheld==0.5.7
 uwsgi
 
-greenlet==0.4.4
+greenlet==0.4.5

+ 3 - 2
frameworks/Python/flask/setup_nginxuwsgi.sh

@@ -1,5 +1,6 @@
 #!/bin/bash
 
-$NGINX_HOME/sbin/nginx -c $TROOT/nginx.conf
+sed -i 's|include .*/conf/uwsgi_params;|include '"${NGINX_HOME}"'/conf/uwsgi_params;|g' nginx.conf
 
-$PY2_ROOT/bin/uwsgi --ini uwsgi.ini --processes ${MAX_THREADS} --wsgi app:app &
+$NGINX_HOME/sbin/nginx -c $TROOT/nginx.conf
+${PY2_ROOT}/bin/uwsgi -d --ini ${TROOT}/uwsgi.ini --processes ${MAX_THREADS} --wsgi app:app

+ 2 - 2
frameworks/Python/pyramid/requirements.txt

@@ -1,8 +1,8 @@
 psycopg2==2.5.3
 gunicorn==19.1
-meinheld==0.5.6
+meinheld==0.5.7
 SQLAlchemy==0.9.7
 pyramid==1.5.1
 pyramid_chameleon==0.3
 
-greenlet==0.4.4
+greenlet==0.4.5

+ 3 - 2
frameworks/Python/uwsgi/setup_nginx.sh

@@ -1,5 +1,6 @@
 #!/bin/bash
 
-$NGINX_HOME/sbin/nginx -c ${TROOT}/nginx.conf
+sed -i 's|include .*/conf/uwsgi_params;|include '"${NGINX_HOME}"'/conf/uwsgi_params;|g' nginx.conf
 
-$PY2_ROOT/bin/uwsgi --ini uwsgi.ini --processes ${MAX_THREADS} --gevent 1000 --wsgi hello &
+$NGINX_HOME/sbin/nginx -c ${TROOT}/nginx.conf
+$PY2_ROOT/bin/uwsgi -d --ini uwsgi.ini --processes ${MAX_THREADS} --gevent 1000 --wsgi hello

+ 2 - 2
frameworks/Python/wsgi/requirements.txt

@@ -1,6 +1,6 @@
 ujson==1.33
 uwsgi
 gunicorn==19.1
-meinheld==0.5.6
+meinheld==0.5.7
 
-greenlet==0.4.4
+greenlet==0.4.5

+ 3 - 2
frameworks/Python/wsgi/setup_nginxuwsgi.sh

@@ -1,5 +1,6 @@
 #!/bin/bash
 
-$NGINX_HOME/sbin/nginx -c $TROOT/nginx.conf
+sed -i 's|include .*/conf/uwsgi_params;|include '"${NGINX_HOME}"'/conf/uwsgi_params;|g' nginx.conf
 
-$PY2_ROOT/bin/uwsgi --ini uwsgi.ini --processes ${MAX_THREADS} --wsgi hello:app &
+$NGINX_HOME/sbin/nginx -c $TROOT/nginx.conf
+$PY2_ROOT/bin/uwsgi -d --ini uwsgi.ini --processes ${MAX_THREADS} --wsgi hello:app

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

@@ -3,13 +3,13 @@
 RETCODE=$(fw_exists ${IROOT}/pypy.installed)
 [ ! "$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_untar pypy-2.3.1-linux64.tar.bz2
-ln -sf pypy-2.3.1-linux64 pypy
+fw_get https://bitbucket.org/pypy/pypy/downloads/pypy-2.4.0-linux64.tar.bz2 -O pypy-2.4.0-linux64.tar.bz2
+fw_untar pypy-2.4.0-linux64.tar.bz2
+ln -sf pypy-2.4.0-linux64 pypy
 
 if [ ! -f "get-pip.py" ]; then
 fw_get https://bootstrap.pypa.io/get-pip.py -O get-pip.py
 fi
 ${IROOT}/pypy/bin/pypy get-pip.py
 
-touch ${IROOT}/pypy.installed
+touch ${IROOT}/pypy.installed

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

@@ -3,17 +3,14 @@
 RETCODE=$(fw_exists ${IROOT}/py2.installed)
 [ ! "$RETCODE" == 0 ] || { return 0; }
 
-fw_get http://www.python.org/ftp/python/2.7.8/Python-2.7.8.tgz
-fw_untar Python-2.7.8.tgz
-cd Python-2.7.8
+fw_get http://www.python.org/ftp/python/2.7.9/Python-2.7.9.tgz
+fw_untar Python-2.7.9.tgz
+cd Python-2.7.9
 ./configure --prefix=${IROOT}/py2 --disable-shared --quiet
 make -j4 --quiet
 make install --quiet
 
-cd ..
-if [ ! -f "get-pip.py" ]; then
-fw_get https://bootstrap.pypa.io/get-pip.py -O get-pip.py
-fi
-${IROOT}/py2/bin/python get-pip.py
+${IROOT}/py2/bin/python -m ensurepip -U
+${IROOT}/py2/bin/pip install -U setuptools pip
 
-touch ${IROOT}/py2.installed
+touch ${IROOT}/py2.installed

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

@@ -10,4 +10,7 @@ cd Python-3.4.2
 make -j4 --quiet
 make install --quiet
 
-touch ${IROOT}/py3.installed
+${IROOT}/py3/bin/python3 -m ensurepip -U
+${IROOT}/py3/bin/pip3 install -U setuptools pip
+
+touch ${IROOT}/py3.installed