@@ -120,7 +120,9 @@ def make_spack_env(
120120
121121 for shell_filename in [f'{ machine } .sh' , f'{ machine } _{ compiler } _{ mpi } .sh' ]:
122122 # load modules, etc. for this machine
123- path = importlib_resources .files ('mache.spack' ) / shell_filename
123+ path = (
124+ importlib_resources .files ('mache.spack.templates' ) / shell_filename
125+ )
124126 try :
125127 with open (str (path )) as fp :
126128 template = Template (fp .read ())
@@ -135,7 +137,8 @@ def make_spack_env(
135137 modules = f'{ modules } \n { bash_script } '
136138
137139 path = (
138- importlib_resources .files ('mache.spack' ) / 'build_spack_env.template'
140+ importlib_resources .files ('mache.spack.templates' )
141+ / 'build_spack_env.template'
139142 )
140143 with open (str (path )) as fp :
141144 template = Template (fp .read ())
@@ -270,7 +273,9 @@ def get_spack_script(
270273 f'{ machine } _{ compiler } _{ mpi } .{ shell } ' ,
271274 ]:
272275 # load modules, etc. for this machine
273- path = importlib_resources .files ('mache.spack' ) / shell_filename
276+ path = (
277+ importlib_resources .files ('mache.spack.templates' ) / shell_filename
278+ )
274279 try :
275280 with open (str (path )) as fp :
276281 template = Template (fp .read ())
@@ -385,7 +390,9 @@ def get_modules_env_vars_and_mpi_compilers(
385390 f'{ machine } .{ shell } ' ,
386391 f'{ machine } _{ compiler } _{ mpi } .{ shell } ' ,
387392 ]:
388- path = importlib_resources .files ('mache.spack' ) / shell_filename
393+ path = (
394+ importlib_resources .files ('mache.spack.templates' ) / shell_filename
395+ )
389396 try :
390397 with open (str (path )) as fp :
391398 template = Template (fp .read ())
@@ -417,7 +424,10 @@ def _get_yaml_data(
417424 """Get the data from the jinja-templated yaml file based on settings"""
418425 if yaml_template is None :
419426 template_filename = f'{ machine } _{ compiler } _{ mpi } .yaml'
420- path = importlib_resources .files ('mache.spack' ) / template_filename
427+ path = (
428+ importlib_resources .files ('mache.spack.templates' )
429+ / template_filename
430+ )
421431 try :
422432 with open (str (path )) as fp :
423433 template = Template (fp .read ())
0 commit comments