diff --git a/tljh/jupyterhub_config.py b/tljh/jupyterhub_config.py index 2806032..7f11bfa 100644 --- a/tljh/jupyterhub_config.py +++ b/tljh/jupyterhub_config.py @@ -4,6 +4,7 @@ JupyterHub config for the littlest jupyterhub. from glob import glob import os +import pluggy from systemdspawner import SystemdSpawner from tljh import configurer, user, hooks @@ -58,7 +59,13 @@ tljh_config = configurer.load_config() configurer.apply_config(tljh_config, c) # Let TLJH hooks modify `c` if they want -hooks.tljh_custom_jupyterhub_config(c) + +# Set up plugin infrastructure +pm = pluggy.PluginManager('tljh') +pm.add_hookspecs(hooks) +pm.load_setuptools_entrypoints('tljh') +# Call our custom configuration plugin +pm.hook.tljh_custom_jupyterhub_config(c=c) # Load arbitrary .py config files if they exist. # This is our escape hatch