Skip to content
Merged
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
2 changes: 2 additions & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
include mache/cime_machine_config/*.xml
include mache/machines/*.cfg
include mache/machines/pre_conda/*.sh
include mache/machines/pre_conda/*.csh
include mache/spack/templates/*.yaml
include mache/spack/templates/*.template
include mache/spack/templates/*.sh
Expand Down
23 changes: 23 additions & 0 deletions mache/machines/pre_conda/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
from importlib.resources import read_text


def load_pre_conda_script(machine, ext):
"""
Return the contents of a shell script to prepend before loading conda
Parameters
----------
machine : str
The name of the machine to load the script for.
ext : str
The file extension of the script, either 'sh' or 'csh'.
Returns
-------
str
The contents of the shell script.
"""
try:
return read_text('mache.machines.pre_conda', f'{machine}.{ext}')
except FileNotFoundError:
return ''
1 change: 1 addition & 0 deletions mache/machines/pre_conda/polaris.csh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
module unload xalt
1 change: 1 addition & 0 deletions mache/machines/pre_conda/polaris.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
module unload xalt
Loading