mirror of
https://github.com/clearlinux/uwsgi.git
synced 2026-09-05 21:21:53 +00:00
added __name__ and sys.argv[0] in pypy setup script
This commit is contained in:
@@ -3984,3 +3984,7 @@ void create_msg_pipe(int *fd, int bufsize) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
char *uwsgi_binary_path() {
|
||||
return uwsgi.binary_path ? uwsgi.binary_path : "uwsgi";
|
||||
}
|
||||
|
||||
@@ -5,6 +5,7 @@ sys.path.extend(os.environ.get('PYTHONPATH','').split(os.pathsep))
|
||||
import imp
|
||||
import traceback
|
||||
|
||||
__name__ = '__main__'
|
||||
mainmodule = type(sys)('__main__')
|
||||
sys.modules['__main__'] = mainmodule
|
||||
|
||||
@@ -32,6 +33,8 @@ struct uwsgi_opt {
|
||||
int configured;
|
||||
};
|
||||
|
||||
char *uwsgi_binary_path();
|
||||
|
||||
int uwsgi_response_write_body_do(void *, char *, uint64_t);
|
||||
int uwsgi_response_sendfile_do_can_close(void *, int, uint64_t, uint64_t, int);
|
||||
int uwsgi_response_prepare_headers(void *, char *, uint16_t);
|
||||
@@ -65,6 +68,8 @@ it sucks, i will fix it in the near future...
|
||||
"""
|
||||
wsgi_application = None
|
||||
|
||||
sys.argv.insert(0, ffi.string(lib.uwsgi_binary_path()))
|
||||
|
||||
"""
|
||||
load a wsgi module
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user