[buildout]
parts =
  switch_softwaretype

eggs-directory = ${buildout:eggs-directory}
develop-eggs-directory = ${buildout:develop-eggs-directory}

[switch_softwaretype]
recipe = slapos.cookbook:switch-softwaretype
default = $${:jupyter}
jupyter = instance-jupyter:output
RootSoftwareInstance = $${:default}

[slap-configuration]
recipe = slapos.cookbook:slapconfiguration.serialised
computer = $${slap-connection:computer-id}
partition = $${slap-connection:partition-id}
url = $${slap-connection:server-url}
key = $${slap-connection:key-file}
cert = $${slap-connection:cert-file}

[instance-jupyter]
recipe = slapos.recipe.template:jinja2
filename = instance-jupyter.cfg.in
url = ${instance-jupyter:location}/$${:filename}
output = $${buildout:directory}/template.cfg
context =
  key slapparameter_dict slap-configuration:configuration
  raw bin_directory ${buildout:bin-directory}
  raw develop_eggs_directory ${buildout:develop-eggs-directory}
  raw eggs_directory ${buildout:eggs-directory}
  raw openssl_output ${openssl-output:openssl}
  raw python_executable ${jupyter:python_executable}
  raw jupyter_config_location ${jupyter-notebook-config:location}
  raw jupyter_config_filename ${jupyter-notebook-config:filename}
  raw erp5_kernel_location ${erp5-kernel:location}
  raw erp5_kernel_filename ${erp5-kernel:filename}
  raw kernel_json_location ${kernel-json:location}
  raw kernel_json_filename ${kernel-json:filename}
  raw custom_js_location ${custom-js:location}
  raw custom_js_filename ${custom-js:filename}
  raw monitor_template_rendered ${buildout:directory}
  raw cythonplus_repository ${cythonplus-repository:location}
  raw gcc_location ${gcc:prefix}
