Merge branch 'release_18.05' into dev

This commit is contained in:
Nicola Soranzo
2018-06-17 13:11:47 +01:00
5 changed files with 59 additions and 35 deletions
+3
View File
@@ -246,4 +246,7 @@ if [ $SKIP_CLIENT_BUILD -eq 0 ]; then
echo "ERROR: Galaxy client build failed. See ./client/README.md for more information, including how to get help."
exit 1
fi
else
echo "Regenerating static plugin directories."
python ./scripts/plugin_staging.py
fi
+3 -1
View File
@@ -23,7 +23,7 @@ ALIASES = {
'module': ('mount',), # mount is not actually an alias for module, but we don't want to set module if mount is set
}
DEFAULT_ARGS = {
'_all_': ('pythonpath', 'threads', 'buffer-size', 'http', 'static-map', 'die-on-term', 'hook-master-start', 'enable-threads'),
'_all_': ('pythonpath', 'threads', 'buffer-size', 'http', 'static-map', 'static-safe', 'die-on-term', 'hook-master-start', 'enable-threads'),
'galaxy': ('py-call-osafterfork',),
'reports': (),
'tool_shed': (),
@@ -92,6 +92,8 @@ def _get_uwsgi_args(cliargs, kwargs):
'http': 'localhost:{port}'.format(port=DEFAULT_PORTS[cliargs.app]),
'static-map': ('/static/style={here}/static/style/blue'.format(here=os.getcwd()),
'/static={here}/static'.format(here=os.getcwd())),
'static-safe': ('{here}/config/plugins/visualizations'.format(here=os.getcwd()),
'{here}/config/plugins/interactive_environments'.format(here=os.getcwd())),
'die-on-term': True,
'enable-threads': True,
'hook-master-start': ('unix_signal:2 gracefully_kill_them_all',
+28
View File
@@ -0,0 +1,28 @@
import glob
import os
import shutil
GXY_ROOT = os.path.abspath(os.path.join(os.path.dirname(os.path.realpath(__file__)), os.pardir))
def link_up_static(f):
src = os.path.join(GXY_ROOT, 'config/plugins', f)
dest = os.path.join(GXY_ROOT, 'static/plugins', f)
dest_parent = os.path.abspath(os.path.join(dest, os.pardir))
if os.path.exists(dest):
# We have to clear out the old staged or linked static to relink.
if os.path.islink(dest):
os.unlink(dest)
else:
shutil.rmtree(dest)
elif not os.path.exists(dest_parent):
# Create parent dir structure to symlink directly to static.
os.makedirs(dest_parent)
os.symlink(src, dest)
if __name__ == "__main__":
# This is not awesome, but it's temporary, and it supports two-tier plugin static.
for f in glob.glob(os.path.join(GXY_ROOT, 'config/plugins/*/*/static')) + glob.glob(os.path.join(GXY_ROOT, 'config/plugins/*/*/*/static')):
f = os.path.relpath(f, os.path.join(GXY_ROOT, 'config/plugins'))
link_up_static(f)