[!18] Make iteration order of versions deterministic to ensure default version
Merge branch 'feature/deterministic-version' into 'master' See merge request [spack/dune-spack!18] [spack/dune-spack!18]: Nonespack/dune-spack/merge_requests/18
This commit is contained in:
commit
d74cbb85a8
|
@ -33,11 +33,13 @@ class Dune(CMakePackage):
|
|||
git = "https://gitlab.dune-project.org/core/dune-common.git"
|
||||
|
||||
# This defines a mapping of available versions of the dune Spack package
|
||||
# and the branch name in the Dune repositories this refers to.
|
||||
dune_versions_to_branch = {
|
||||
"master" : "master",
|
||||
"2.7" : "releases/2.7",
|
||||
}
|
||||
# and the branch name in the Dune repositories this refers to. This is a
|
||||
# list instead of a dictionary to ensure iteration order (first entry is
|
||||
# the default version) in Python3.
|
||||
dune_versions_to_branch = [
|
||||
("2.7", "releases/2.7"),
|
||||
("master" , "master"),
|
||||
]
|
||||
|
||||
# Variants for the general build process
|
||||
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
|
||||
# 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.
|
||||
for vers, branch in dune_versions_to_branch.items():
|
||||
for vers, branch in dune_versions_to_branch:
|
||||
version(vers, branch=branch)
|
||||
|
||||
resource(
|
||||
|
|
Loading…
Reference in New Issue