diff --git a/packages/dune/package.py b/packages/dune/package.py index ede9d95..28d2270 100644 --- a/packages/dune/package.py +++ b/packages/dune/package.py @@ -38,6 +38,7 @@ class Dune(CMakePackage): # the default version) in Python3. dune_versions_to_branch = [ ("2.7", "releases/2.7"), + ("2.6", "releases/2.6"), ("master" , "master"), ] @@ -258,6 +259,13 @@ class Dune(CMakePackage): when='@2.7+python', ) + resource( + name='dune-python', + git='https://gitlab.dune-project.org/staging/dune-python.git', + branch='releases/2.6', + when='@2.6+python', + ) + # The dune-codegen package does not yet have a 2.7-compatible release resource( name='dune-codegen', @@ -266,6 +274,7 @@ class Dune(CMakePackage): when='@master+codegen', submodules=True, ) + conflicts('dune@2.6', when='+codegen') conflicts('dune@2.7', when='+codegen') # Make sure that Python components integrate well into Spack @@ -382,7 +391,13 @@ class Dune(CMakePackage): installer = Executable('bin/dunecontrol') options_file = join_path(self.stage.source_path, "..", "dune.opts") - installer('--builddir=%s'%self.build_directory , '--opts=%s' % options_file, 'cmake') + + # The 'cmake' command of dunecontrol was added in 2.7 + commandname = 'cmake' + if '@2.6' in self.spec: + commandname = 'configure' + + installer('--builddir=%s'%self.build_directory , '--opts=%s' % options_file, commandname) def install(self, spec, prefix): installer = Executable('bin/dunecontrol')