mirror of
https://github.com/clearlinux/uwsgi.git
synced 2026-09-06 05:31:44 +00:00
prepare for embedded plugins builder
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
#include <uwsgi.h>
|
||||
|
||||
/*
|
||||
|
||||
steps:
|
||||
|
||||
mkdir(.uwsgi_plugin_builder)
|
||||
generate .uwsgi_plugin_builder/uwsgi.h
|
||||
setenv(CFLAGS=uwsgi_cflags)
|
||||
pipe uwsgiconfig.py to python passing args
|
||||
|
||||
*/
|
||||
|
||||
int uwsgi_build_plugin(char *directory) {
|
||||
return 0;
|
||||
}
|
||||
@@ -907,6 +907,7 @@ static struct uwsgi_option uwsgi_base_options[] = {
|
||||
{"exit", optional_argument, 0, "force exit() of the instance", uwsgi_opt_exit, NULL, UWSGI_OPT_IMMEDIATE},
|
||||
{"cflags", no_argument, 0, "report uWSGI CFLAGS (useful for building external plugins)", uwsgi_opt_cflags, NULL, UWSGI_OPT_IMMEDIATE},
|
||||
{"dot-h", no_argument, 0, "dump the uwsgi.h used for building the core (useful for building external plugins)", uwsgi_opt_dot_h, NULL, UWSGI_OPT_IMMEDIATE},
|
||||
{"build-plugin", no_argument, 0, "build a uWSGI plugin for the current binary", uwsgi_opt_build_plugin, NULL, UWSGI_OPT_IMMEDIATE},
|
||||
{"version", no_argument, 0, "print uWSGI version", uwsgi_opt_print, UWSGI_VERSION, 0},
|
||||
{0, 0, 0, 0, 0, 0, 0}
|
||||
};
|
||||
@@ -4506,6 +4507,9 @@ void uwsgi_opt_dot_h(char *opt, char *filename, void *foobar) {
|
||||
exit(0);
|
||||
}
|
||||
|
||||
void uwsgi_opt_build_plugin(char *opt, char *directory, void *foobar) {
|
||||
_exit(uwsgi_build_plugin(directory));
|
||||
}
|
||||
|
||||
void uwsgi_opt_connect_and_read(char *opt, char *address, void *foobar) {
|
||||
|
||||
|
||||
@@ -3761,6 +3761,7 @@ char *uwsgi_substitute(char *, char *, char *);
|
||||
|
||||
void uwsgi_opt_add_custom_option(char *, char *, void *);
|
||||
void uwsgi_opt_cflags(char *, char *, void *);
|
||||
void uwsgi_opt_build_plugin(char *, char *, void *);
|
||||
void uwsgi_opt_dot_h(char *, char *, void *);
|
||||
void uwsgi_opt_connect_and_read(char *, char *, void *);
|
||||
void uwsgi_opt_extract(char *, char *, void *);
|
||||
@@ -4528,6 +4529,8 @@ struct uwsgi_protocol *uwsgi_register_protocol(char *, void (*)(struct uwsgi_soc
|
||||
|
||||
void uwsgi_protocols_register(void);
|
||||
|
||||
int uwsgi_build_plugin(char *dir);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
+1
-1
@@ -546,7 +546,7 @@ class uConf(object):
|
||||
'core/setup_utils', 'core/clock', 'core/init', 'core/buffer', 'core/reader', 'core/writer', 'core/alarm', 'core/cron', 'core/hooks',
|
||||
'core/plugins', 'core/lock', 'core/cache', 'core/daemons', 'core/errors', 'core/hash', 'core/master_events', 'core/chunked',
|
||||
'core/queue', 'core/event', 'core/signal', 'core/strings', 'core/progress', 'core/timebomb', 'core/ini', 'core/fsmon', 'core/mount',
|
||||
'core/metrics',
|
||||
'core/metrics', 'core/plugins_builder',
|
||||
'core/rpc', 'core/gateway', 'core/loop', 'core/cookie', 'core/querystring', 'core/rb_timers', 'core/transformations', 'core/uwsgi']
|
||||
# add protocols
|
||||
self.gcc_list.append('proto/base')
|
||||
|
||||
Reference in New Issue
Block a user