mirror of
https://github.com/clearlinux/uwsgi.git
synced 2026-09-06 21:51:30 +00:00
parse plugin-specific options
This commit is contained in:
@@ -4,6 +4,7 @@ from distutils import sysconfig
|
||||
|
||||
NAME='python'
|
||||
GCC_LIST = ['python_plugin', 'pyutils', 'pyloader', 'wsgi_handlers', 'wsgi_headers', 'wsgi_subhandler', 'web3_subhandler', 'pump_subhandler', 'gil', 'uwsgi_pymodule', 'profiler', 'symimporter']
|
||||
#OBJ_LIST = ['/usr/lib/libpython2.6.a']
|
||||
|
||||
CFLAGS = ['-I' + sysconfig.get_python_inc(), '-I' + sysconfig.get_python_inc(plat_specific=True) ]
|
||||
|
||||
|
||||
@@ -726,6 +726,12 @@ def build_plugin(path, uc, cflags, ldflags, libs, name = None):
|
||||
else:
|
||||
p_cflags.append("-D%s_plugin=%s_plugin" % (up.NAME, name))
|
||||
|
||||
try:
|
||||
for opt in uc.config.options(name):
|
||||
p_cflags.append('-DUWSGI_PLUGIN_%s_%s="%s"' % (name.upper(), opt.upper(), uc.config.get(name, opt, '1')))
|
||||
except:
|
||||
pass
|
||||
|
||||
plugin_dest = uc.get('plugin_dir') + '/' + name + '_plugin'
|
||||
|
||||
shared_flag = '-shared'
|
||||
@@ -746,6 +752,9 @@ def build_plugin(path, uc, cflags, ldflags, libs, name = None):
|
||||
except:
|
||||
pass
|
||||
|
||||
#for ofile in up.OBJ_LIST:
|
||||
# gcc_list.insert(0,ofile)
|
||||
|
||||
gccline = "%s -fPIC %s -o %s.so %s %s %s %s" % (GCC, shared_flag, plugin_dest, ' '.join(p_cflags), ' '.join(p_ldflags), ' '.join(gcc_list), ' '.join(p_libs) )
|
||||
print(gccline)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user