File tree Expand file tree Collapse file tree 4 files changed +27
-0
lines changed Expand file tree Collapse file tree 4 files changed +27
-0
lines changed Original file line number Diff line number Diff line change 11include mache/cime_machine_config/*.xml
22include mache/machines/*.cfg
3+ include mache/machines/pre_conda/*.sh
4+ include mache/machines/pre_conda/*.csh
35include mache/spack/templates/*.yaml
46include mache/spack/templates/*.template
57include mache/spack/templates/*.sh
Original file line number Diff line number Diff line change 1+ from importlib .resources import read_text
2+
3+
4+ def load_pre_conda_script (machine , ext ):
5+ """
6+ Return the contents of a shell script to prepend before loading conda
7+
8+ Parameters
9+ ----------
10+ machine : str
11+ The name of the machine to load the script for.
12+ ext : str
13+ The file extension of the script, either 'sh' or 'csh'.
14+
15+ Returns
16+ -------
17+ str
18+ The contents of the shell script.
19+ """
20+ try :
21+ return read_text ('mache.machines.pre_conda' , f'{ machine } .{ ext } ' )
22+ except FileNotFoundError :
23+ return ''
Original file line number Diff line number Diff line change 1+ module unload xalt
Original file line number Diff line number Diff line change 1+ module unload xalt
You can’t perform that action at this time.
0 commit comments