Skip to content

Commit

Permalink
Add *args, **kwargs to prepare_step(s)...in full this time
Browse files Browse the repository at this point in the history
  • Loading branch information
Alan O'Cais committed Sep 15, 2017
1 parent 570cf47 commit 3a1496a
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions easybuild/easyblocks/generic/systemcompiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@
from distutils.version import LooseVersion

from easybuild.easyblocks.generic.bundle import Bundle
from easybuild.easyblocks.icc import EB_icc
from easybuild.easyblocks.ifort import EB_ifort
from easybuild.easyblocks.gcc import EB_GCC
from easybuild.framework.easyconfig.easyconfig import ActiveMNS
Expand Down Expand Up @@ -83,7 +82,8 @@ def extract_compiler_version(compiler_name):

return compiler_version

class SystemCompiler(Bundle, EB_GCC, EB_icc, EB_ifort):
# No need to inherit from EB_icc since EB_ifort already inherits from that
class SystemCompiler(Bundle, EB_GCC, EB_ifort):
"""
Support for generating a module file for the system compiler with specified name.
Expand All @@ -98,7 +98,6 @@ def extra_options():
"""Add custom easyconfig parameters for SystemCompiler easyblock."""
# Gather extra_vars from inherited classes, order matters here to make this work without problems in __init__
extra_vars = EB_GCC.extra_options()
extra_vars.update(EB_icc.extra_options())
extra_vars.update(EB_ifort.extra_options())
extra_vars.update(Bundle.extra_options())
# Add an option to add all module path extensions to the resultant easyconfig
Expand Down Expand Up @@ -195,8 +194,6 @@ def prepare_step(self, *args, **kwargs):
if self.cfg['generate_standalone_module']:
if self.cfg['name'] in ['GCC', 'GCCcore']:
EB_GCC.prepare_step(self, *args, **kwargs)
elif self.cfg['name'] in ['icc']:
EB_icc.prepare_step(self, *args, **kwargs)
elif self.cfg['name'] in ['ifort']:
EB_ifort.prepare_step(self, *args, **kwargs)
else:
Expand All @@ -216,8 +213,6 @@ def make_module_req_guess(self):
if self.cfg['generate_standalone_module']:
if self.cfg['name'] in ['GCC','GCCcore']:
guesses = EB_GCC.make_module_req_guess(self)
elif self.cfg['name'] in ['icc']:
guesses = EB_icc.make_module_req_guess(self)
elif self.cfg['name'] in ['ifort']:
guesses = EB_ifort.make_module_req_guess(self)
else:
Expand Down Expand Up @@ -263,8 +258,6 @@ def make_module_extra(self, *args, **kwargs):
if self.cfg['generate_standalone_module']:
if self.cfg['name'] in ['GCC','GCCcore']:
extras = EB_GCC.make_module_extra(self, *args, **kwargs)
elif self.cfg['name'] in ['icc']:
extras = EB_icc.make_module_extra(self, *args, **kwargs)

This comment has been minimized.

Copy link
@boegel

boegel Sep 15, 2017

Member

nonono, leave this in there, just change the class definition...

You don't need to derive from EB_icc explicitly, that's already covered by depending on EB_ifort

But you still need this elif icc and call to EB_icc.*...

This comment has been minimized.

Copy link
@ocaisa

ocaisa Sep 15, 2017

Member

Whoops, ok

elif self.cfg['name'] in ['ifort']:
extras = EB_ifort.make_module_extra(self, *args, **kwargs)
else:
Expand Down

0 comments on commit 3a1496a

Please sign in to comment.