mache.spack.install.render_install_script

mache.spack.install.render_install_script(*, spack_path, env_name, yaml_path, prologue, pins, work_dir, mirror=None, custom_spack='', build_jobs=None, environ=None)[source]

Render the bash script that checks out Spack and builds an environment.

Parameters:
  • spack_path (str) – The Spack checkout ($SPACK_ROOT), created if absent

  • env_name (str) – The managed environment to (re)create

  • yaml_path (str) – The rendered spack.yaml for the environment

  • prologue (str) – Shell commands that load modules and set variables before Spack runs

  • pins (dict) – Validated pins from mache.spack.pins.load_pins()

  • work_dir (str) – Where spack.lock and provenance.yaml are copied after the build

  • mirror (str, optional) – A local Spack source mirror

  • custom_spack (str, optional) – Spack commands to run after the environment is installed

  • build_jobs (int, optional) – Passed to spack install -j

  • environ (dict, optional) – The calling environment (os.environ by default); its proxy variables are exported in the script, see proxy_exports()

Returns:

script (str) – The rendered bash script