Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 1 addition & 7 deletions stackinator/etc/envvars.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@
from enum import Enum
from typing import List, Optional

import yaml


class EnvVarOp(Enum):
PREPEND = 1
Expand Down Expand Up @@ -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():
Expand Down
2 changes: 2 additions & 0 deletions stackinator/templates/Make.user
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}

Expand Down
2 changes: 1 addition & 1 deletion stackinator/templates/Makefile.environments
Original file line number Diff line number Diff line change
Expand Up @@ -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 $@

Expand Down
Loading