Use join_path from spack instead of string concatenation
This commit is contained in:
parent
a1aa78f02f
commit
fae067a0d7
|
@ -24,8 +24,6 @@ import os
|
|||
from spack import *
|
||||
|
||||
|
||||
|
||||
|
||||
class Dune(CMakePackage):
|
||||
"""
|
||||
DUNE, the Distributed and Unified Numerics Environment is a modular toolbox for solving partial differential equations (PDEs) with grid-based methods.
|
||||
|
@ -265,7 +263,7 @@ class Dune(CMakePackage):
|
|||
def cmake(self, spec, prefix):
|
||||
if self.stage.archive_file:
|
||||
os.remove(self.stage.archive_file)
|
||||
optFile = open(self.stage.source_path+"/../dune.opts", "w")
|
||||
optFile = open(join_path(self.stage.source_path, "..", "dune.opts"), "w")
|
||||
optFile.write('CMAKE_FLAGS="')
|
||||
for flag in self.cmake_args():
|
||||
optFile.write(flag.replace("\"", "'")+" ")
|
||||
|
@ -274,21 +272,21 @@ class Dune(CMakePackage):
|
|||
optFile.close()
|
||||
set_executable('bin/dunecontrol')
|
||||
installer = Executable('bin/dunecontrol')
|
||||
options_file=self.stage.source_path+"/../dune.opts"
|
||||
options_file = join_path(self.stage.source_path, "..", "dune.opts")
|
||||
installer('--builddir=%s'%self.build_directory , '--opts=%s' % options_file, 'cmake')
|
||||
pass
|
||||
|
||||
def install(self, spec, prefix):
|
||||
set_executable('bin/dunecontrol')
|
||||
installer = Executable('bin/dunecontrol')
|
||||
options_file=self.stage.source_path+"/../dune.opts"
|
||||
options_file = join_path(self.stage.source_path, "..", "dune.opts")
|
||||
installer('--builddir=%s'%self.build_directory , '--opts=%s' % options_file, 'make', 'install')
|
||||
pass
|
||||
|
||||
def build(self, spec, prefix):
|
||||
set_executable('bin/dunecontrol')
|
||||
installer = Executable('bin/dunecontrol')
|
||||
options_file=self.stage.source_path+"/../dune.opts"
|
||||
options_file = join_path(self.stage.source_path, "..", "dune.opts")
|
||||
installer('--builddir=%s'%self.build_directory , '--opts=%s' % options_file, 'make')
|
||||
pass
|
||||
|
||||
|
|
Loading…
Reference in New Issue