Skip to content

Commit

Permalink
Merge pull request #37 from LLNL/feature/mirror_in_config
Browse files Browse the repository at this point in the history
Make mirror configurable in spack_config
  • Loading branch information
adrienbernede authored Dec 4, 2020
2 parents 0daf15f + 81369d9 commit 8addbef
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions uberenv.py
Original file line number Diff line number Diff line change
Expand Up @@ -443,18 +443,24 @@ def patch(self):
# copy in "defaults" config.yaml
config_yaml = os.path.abspath(pjoin(self.uberenv_path,"spack_configs","config.yaml"))
sexe("cp {} {}/".format(config_yaml, spack_etc_defaults_dir ), echo=True)
mirrors_yaml = os.path.abspath(pjoin(self.uberenv_path,"spack_configs","mirrors.yaml"))
sexe("cp {} {}/".format(mirrors_yaml, spack_etc_defaults_dir ), echo=True)

# copy in other settings per platform
if not cfg_dir is None:
print("[copying uberenv compiler and packages settings from {0}]".format(cfg_dir))

config_yaml = pjoin(cfg_dir,"config.yaml")
mirrors_yaml = pjoin(cfg_dir,"mirrors.yaml")
compilers_yaml = pjoin(cfg_dir,"compilers.yaml")
packages_yaml = pjoin(cfg_dir,"packages.yaml")

if os.path.isfile(config_yaml):
sexe("cp {} {}/".format(config_yaml , spack_etc_defaults_dir ), echo=True)

if os.path.isfile(mirrors_yaml):
sexe("cp {} {}/".format(mirrors_yaml , spack_etc_defaults_dir ), echo=True)

if os.path.isfile(compilers_yaml):
sexe("cp {} {}/".format(compilers_yaml, spack_etc_defaults_dir ), echo=True)

Expand Down

0 comments on commit 8addbef

Please sign in to comment.