diff --git a/plugins/python/python_plugin.c b/plugins/python/python_plugin.c index f1bc0b19..5dc98962 100644 --- a/plugins/python/python_plugin.c +++ b/plugins/python/python_plugin.c @@ -883,9 +883,11 @@ void uwsgi_python_init_apps() { init_pyargv(); -#ifdef UWSGI_MINTERPRETERS +#ifndef UWSGI_PYPY +#ifdef UWSGI_EMBEDDED init_uwsgi_embedded_module(); #endif +#endif #ifdef __linux__ #if !defined(PYTHREE) && !defined(UWSGI_PYPY) diff --git a/pypyuwsgi.py b/pypyuwsgi.py new file mode 100644 index 00000000..482f5e24 --- /dev/null +++ b/pypyuwsgi.py @@ -0,0 +1,18 @@ +import sys +import os +import pyuwsgi + +orig_args = sys.argv +orig_executable = sys.executable +orig_args.insert(0, orig_executable) + +uwsgi_args = [] + +for arg in sys.argv[2:]: + uwsgi_args.append(arg) + +#pyuwsgi.run('welcome.ini') +pyuwsgi.run(uwsgi_args) + +# if you are here uWSGI has been reloaded +os.execv(orig_executable, orig_args)