Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
bcumming committed Jun 18, 2024
1 parent c04f2bf commit 39b3487
Show file tree
Hide file tree
Showing 14 changed files with 1,092 additions and 2 deletions.
408 changes: 408 additions & 0 deletions stackinator/envvars.py

Large diffs are not rendered by default.

4 changes: 3 additions & 1 deletion stackinator/recipe.py
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,9 @@ def generate_environment_specs(self, raw):
view_config = {"root": str(self.mount / "env" / view_name)}
else:
view_config["root"] = str(self.mount / "env" / view_name)
environments[cname]["view"] = {"name": view_name, "config": view_config}
extra = view_config.pop("uenv")

environments[cname]["view"] = {"name": view_name, "config": view_config, "extra": extra}

self.environments = environments

Expand Down
14 changes: 14 additions & 0 deletions stackinator/schema/environments.json
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,20 @@
"patternProperties": {
"all|\\w[\\w-]*": {"type": "string"}
}
},
"uenv": {
"type": "object",
"additionalPropertis": false,
"properties": {
"add_compilers": {
"type": "boolean",
"default": true
}
"set_ld_library_path": {
"type": "boolean",
"default": false
}
}
}
}
}
Expand Down
3 changes: 2 additions & 1 deletion stackinator/templates/Makefile.environments
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,10 @@ all:{% for env in environments %} {{ env }}/generated/build_cache{% endfor %}
{% if config.view %}
{% if develop or (spack_version>="0.21") %}
$(SPACK) env activate --with-view default --sh ./{{ env }} > $(STORE)/env/{{ config.view.name }}/activate.sh
$(SOFTWARE_STACK_PROJECT)/add-compiler-links.py ./{{ env }}/compilers.yaml $(STORE)/env/{{ config.view.name }}/activate.sh $(SOFTWARE_STACK_PROJECT)
{% else %}
$(SPACK) env activate --with-view --sh ./{{ env }} > $(STORE)/env/{{ config.view.name }}/activate.sh
{% endif %}
{% if config.view.extra.add_compilers or config.view.extra.add_ld_library_path %}
$(SOFTWARE_STACK_PROJECT)/add-compiler-links.py ./{{ env }}/compilers.yaml $(STORE)/env/{{ config.view.name }}/activate.sh $(SOFTWARE_STACK_PROJECT)
{% endif %}
{% endif %}
Expand Down
Loading

0 comments on commit 39b3487

Please sign in to comment.