Skip to content

Commit

Permalink
Clean up the codes
Browse files Browse the repository at this point in the history
  • Loading branch information
c3-builder committed Sep 18, 2023
1 parent 1195cd7 commit bfdefd9
Showing 1 changed file with 5 additions and 9 deletions.
14 changes: 5 additions & 9 deletions easybuild/easyblocks/s/suitesparse.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ def configure_step(self):
else:
self.log.info("Use METIS built in SuiteSparse")
# raise EasyBuildError("Neither METIS or ParMETIS module loaded.")

# config file can catch environment variables after v4.5.0
if LooseVersion(self.version) < LooseVersion('4.5.0'):
cfgvars.update({
Expand All @@ -116,12 +116,12 @@ def configure_step(self):

# patch file
fp = os.path.join(self.cfg['start_dir'], self.config_name, '%s.mk' % self.config_name)

try:
for line in fileinput.input(fp, inplace=1, backup='.orig'):
for (var, val) in list(cfgvars.items()):
# Let's overwrite NVCCFLAGS at the end, since the line breaks and the fact that it appears multiple
# times makes it tricky to handle it properly
# Let's overwrite NVCCFLAGS at the end, since the line breaks and
# the fact that it appears multiple times makes it tricky to handle it properly
# path variables are also moved to the end
if var not in ['NVCCFLAGS', 'INSTALL_LIB', 'INSTALL_INCLUDE', 'METIS_PATH']:
orig_line = line
Expand Down Expand Up @@ -176,18 +176,14 @@ def configure_step(self):
# after v6.0.0, no option for metis, its own metis is used anyway
# nothing to do here, set the CMAKE_OPTIONS in easyconfigs
pass
# self.cfg.update(
# 'prebuildopts',
# 'CMAKE_OPTIONS="-DCMAKE_INSTALL_PREFIX=%s -DBLA_VENDOR=FlexiBLAS"' % self.installdir
# )

def install_step(self):
"""Install by copying the contents of the builddir to the installdir (preserving permissions)"""

if LooseVersion(self.version) < LooseVersion('4.5.0'):
mkdir(os.path.join(self.installdir, 'lib'))
mkdir(os.path.join(self.installdir, 'include'))

super(EB_SuiteSparse, self).install_step()

def sanity_check_step(self):
Expand Down

0 comments on commit bfdefd9

Please sign in to comment.