mirror of
https://github.com/clearlinux/uwsgi.git
synced 2026-09-06 21:51:30 +00:00
added --extra-plugin build option for simplified plugin development
This commit is contained in:
+12
-1
@@ -992,7 +992,10 @@ def build_plugin(path, uc, cflags, ldflags, libs, name = None):
|
||||
except:
|
||||
pass
|
||||
|
||||
plugin_dest = uc.get('plugin_dir') + '/' + name + '_plugin'
|
||||
if uc:
|
||||
plugin_dest = uc.get('plugin_dir') + '/' + name + '_plugin'
|
||||
else:
|
||||
plugin_dest = name + '_plugin'
|
||||
|
||||
shared_flag = '-shared'
|
||||
|
||||
@@ -1102,6 +1105,14 @@ if __name__ == "__main__":
|
||||
name = None
|
||||
print("*** uWSGI building and linking plugin %s ***" % sys.argv[2] )
|
||||
build_plugin(sys.argv[2], uc, cflags, ldflags, libs, name)
|
||||
elif cmd == '--extra-plugin':
|
||||
print("*** uWSGI building and linking plugin ***")
|
||||
cflags = spcall("%s --cflags" % sys.argv[2]).split()
|
||||
try:
|
||||
cflags.append('-I%s' % sys.argv[3])
|
||||
except:
|
||||
pass
|
||||
build_plugin('.', None, cflags, [], [], None)
|
||||
elif cmd == '--clean':
|
||||
os.system("rm -f *.o")
|
||||
os.system("rm -f proto/*.o")
|
||||
|
||||
Reference in New Issue
Block a user