Skip to content

Commit

Permalink
Look for spack mirror when creating a spack env
Browse files Browse the repository at this point in the history
  • Loading branch information
xylar committed Mar 20, 2024
1 parent a04c20f commit bc125a4
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion conda/bootstrap.py
Original file line number Diff line number Diff line change
Expand Up @@ -470,6 +470,11 @@ def build_spack_env(config, update_spack, machine, compiler, mpi, # noqa: C901
scorpio = config.get('deploy', 'scorpio')
parallelio = config.get('deploy', 'parallelio')

if config.has_option('deploy', 'spack_mirror'):
spack_mirror = config.get('deploy', 'spack_mirror')
else:
spack_mirror = None

spack_branch_base = f'{spack_base}/{spack_env}'

specs = list()
Expand Down Expand Up @@ -546,7 +551,7 @@ def build_spack_env(config, update_spack, machine, compiler, mpi, # noqa: C901
include_e3sm_lapack=include_e3sm_lapack,
include_e3sm_hdf5_netcdf=e3sm_hdf5_netcdf,
yaml_template=yaml_template, tmpdir=tmpdir,
custom_spack=custom_spack)
custom_spack=custom_spack, spack_mirror=spack_mirror)

# remove ESMC/ESMF include files that interfere with MPAS time keeping
include_path = f'{spack_branch_base}/var/spack/environments/' \
Expand Down

0 comments on commit bc125a4

Please sign in to comment.