Skip to content
Snippets Groups Projects
Commit 5d1cc4cd authored by Oriol.Tinto's avatar Oriol.Tinto
Browse files

Merge branch 'fixSource' into 'master'

Change +lmu for +source=lmu, allowing also dkrz (default) and dkrz_https

See merge request w2w/autosubmit-icon-today!7
parents de8e6c62 47a0123e
No related branches found
No related tags found
1 merge request!7Change +lmu for +source=lmu, allowing also dkrz (default) and dkrz_https
......@@ -27,7 +27,15 @@ class IconNwp(Package):
version("plexrt", branch="icon-nwp/icon-nwp-plexrt")
version("master", branch="master")
variant("lmu", default=False, description="if git.url and submodules should be patched to use the LMU mirrors")
# FIXME: Workaround to deal with different sources. The default is using dkrz's through ssh.
variant("source", values=('dkrz', 'dkrz_https', 'lmu'), default='dkrz',
description='Select the source of the ICON: dkrz (ssh), dkrz_https, lmu (ssh)')
custom_fetchers = {
"dkrz": "ssh://git@gitlab.dkrz.de/icon/icon-nwp.git",
"dkrz_https": "https://gitlab.dkrz.de/icon/icon-nwp.git",
"lmu": "ssh://git@gitlab.physik.uni-muenchen.de/w2w/icon.git",
}
variant("plexrt", default=False, description="add 3D radiation support with TenStream")
variant("petsc", default=False, description="add PETSc support")
......@@ -57,14 +65,16 @@ class IconNwp(Package):
phases = ["configure", "build", "install"]
def do_fetch(self, mirror_only=False):
if "+lmu" in self.spec:
self.fetcher[0].url = self.git = "ssh://git@gitlab.physik.uni-muenchen.de/w2w/icon.git"
# FIXME: Using the custom_fetchers workaround
source = self.spec.variants['source'].value
self.fetcher[0].url = self.git = self.custom_fetchers[source]
super(IconNwp, self).do_fetch(mirror_only)
def patch(self):
# Run git submodule update
git = which("git")
if "+lmu" in self.spec:
if self.spec.variants['source'].value == 'lmu':
self.patch_submodules()
git("submodule", "update", "--init", "--recursive")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment