diff --git a/stackinator/etc/envvars.py b/stackinator/etc/envvars.py index 0f122057..7c63b6c8 100755 --- a/stackinator/etc/envvars.py +++ b/stackinator/etc/envvars.py @@ -7,8 +7,6 @@ from enum import Enum from typing import List, Optional -import yaml - class EnvVarOp(Enum): PREPEND = 1 @@ -504,12 +502,8 @@ def view_impl(args): envvars.remove_root(args.build_path) if args.compilers is not None: - if not os.path.isfile(args.compilers): - print(f"error - compiler yaml file {args.compilers} does not exist") - exit(1) - with open(args.compilers, "r") as file: - data = yaml.safe_load(file) + data = json.load(file) compilers = [] for p in data["packages"].values(): diff --git a/stackinator/templates/Make.user b/stackinator/templates/Make.user index cb8acb03..68c8f154 100644 --- a/stackinator/templates/Make.user +++ b/stackinator/templates/Make.user @@ -2,6 +2,8 @@ # Copy this file to Make.user and set some variables. +SHELL := bash + # This is the root of the software stack directory. BUILD_ROOT := {{ build_path }} diff --git a/stackinator/templates/Makefile.environments b/stackinator/templates/Makefile.environments index 5a530232..01929d9c 100644 --- a/stackinator/templates/Makefile.environments +++ b/stackinator/templates/Makefile.environments @@ -34,7 +34,7 @@ all:{% for env in environments %} {{ env }}/generated/build_cache{% endfor %} {{ env }}/generated/view_config: {{ env }}/generated/env {% for view in config.views %} $(SPACK) env activate --with-view {{ view.name }} --sh ./{{ env }} > $(STORE)/env/{{ view.name }}/activate.sh - $(BUILD_ROOT)/envvars.py view {% if view.extra.add_compilers %}--compilers=./{{ env }}/packages.yaml {% endif %} --prefix_paths="{{ view.extra.prefix_string }}" $(STORE)/env/{{ view.name }} $(BUILD_ROOT) + $(BUILD_ROOT)/envvars.py view {% if view.extra.add_compilers %}--compilers=<(yq read -j -p v ./{{ env }}/packages.yaml) {% endif %} --prefix_paths="{{ view.extra.prefix_string }}" $(STORE)/env/{{ view.name }} $(BUILD_ROOT) {% endfor %} touch $@