Make iteration order of versions deterministic to ensure default version
This commit is contained in:
parent
282c955e21
commit
bcecb661e0
|
@ -33,11 +33,13 @@ class Dune(CMakePackage):
|
||||||
git = "https://gitlab.dune-project.org/core/dune-common.git"
|
git = "https://gitlab.dune-project.org/core/dune-common.git"
|
||||||
|
|
||||||
# This defines a mapping of available versions of the dune Spack package
|
# This defines a mapping of available versions of the dune Spack package
|
||||||
# and the branch name in the Dune repositories this refers to.
|
# and the branch name in the Dune repositories this refers to. This is a
|
||||||
dune_versions_to_branch = {
|
# list instead of a dictionary to ensure iteration order (first entry is
|
||||||
"master" : "master",
|
# the default version) in Python3.
|
||||||
"2.7" : "releases/2.7",
|
dune_versions_to_branch = [
|
||||||
}
|
("2.7", "releases/2.7"),
|
||||||
|
("master" , "master"),
|
||||||
|
]
|
||||||
|
|
||||||
# Variants for the general build process
|
# Variants for the general build process
|
||||||
variant('shared', default=True, description='Enables the build of shared libraries.')
|
variant('shared', default=True, description='Enables the build of shared libraries.')
|
||||||
|
@ -89,7 +91,7 @@ class Dune(CMakePackage):
|
||||||
# Iterate over all available Dune versions and define resources for all Dune modules
|
# Iterate over all available Dune versions and define resources for all Dune modules
|
||||||
# If a Dune module behaves differently for different versions (e.g. dune-python got
|
# If a Dune module behaves differently for different versions (e.g. dune-python got
|
||||||
# merged into dune-common post-2.7), define the resource outside of this loop.
|
# merged into dune-common post-2.7), define the resource outside of this loop.
|
||||||
for vers, branch in dune_versions_to_branch.items():
|
for vers, branch in dune_versions_to_branch:
|
||||||
version(vers, branch=branch)
|
version(vers, branch=branch)
|
||||||
|
|
||||||
resource(
|
resource(
|
||||||
|
|
Loading…
Reference in New Issue