/sample-uwsgi-pypy

Sample setup for uwsgi + pypy

Primary LanguagePythonMIT LicenseMIT

sample-uwsgi-pypy

Sample setup for uwsgi + pypy

Install pypy

OSX

uwsgi + pypy might not work on OSX because of this issue. I'm trying out Ubuntu 14.10.

$ brew update
$ brew install pypy

Ubuntu 14.10

$ sudo apt-get update
$ sudo apt-get install pypy

Set up vertualenv

$ virtualenv venv --python=pypy
$ source venv/bin/activate
$ pip install -r requirements.txt

Check if pypy plugin is enabled

$ uwsgi --version
2.0.11.1
$ uwsgi --help | grep pypy
Usage: /Users/achiku/work/achiku/sample-uwsgi-pypy/venv/bin/uwsgi [options...]
    --pypy-lib                            set the path/name of the pypy library
    --pypy-setup                          set the path of the python setup script
    --pypy-home                           set the home of pypy library
    --pypy-wsgi                           load a WSGI module
    --pypy-wsgi-file                      load a WSGI/mod_wsgi file
    --pypy-ini-paste                      load a paste.deploy config file containing uwsgi section
    --pypy-paste                          load a paste.deploy config file
    --pypy-eval                           evaluate pypy code before fork()
    --pypy-eval-post-fork                 eval

Start uwsgi

$ uwsgi -i ./uwsgi.ini

Error on OSX

!!! UNABLE to load uWSGI plugin: dlopen(./pypy_plugin.so, 10): image not found !!!
*** WARNING your pypy setup code does not expose a callback for "execute_source" ***
*** no app loaded. going in full dynamic mode ***