Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make FortranPythonPackage aware of (pre)buildopts #1065

Merged
merged 1 commit into from
Dec 7, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions easybuild/easyblocks/generic/fortranpythonpackage.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,10 @@ def build_step(self):
comp_fam = self.toolchain.comp_family()

if comp_fam == toolchain.INTELCOMP: # @UndefinedVariable
cmd = "%s setup.py build --compiler=intel --fcompiler=intelem" % self.python_cmd
self.cfg.update('buildopts', "--compiler=intel --fcompiler=intelem")
cmd = "%s %s setup.py build %s" % (self.cfg['prebuildopts'], self.python_cmd, self.cfg['buildopts'])

elif comp_fam in [toolchain.GCC, toolchain.CLANGGCC]: # @UndefinedVariable
cmdprefix = ""
ldflags = os.getenv('LDFLAGS')
if ldflags:
# LDFLAGS should not be set when building numpy/scipy, because it overwrites whatever numpy/scipy sets
Expand All @@ -62,10 +62,12 @@ def build_step(self):
self.log.debug("LDFLAGS was %s, will be cleared before %s build with '%s'" % (self.name,
ldflags,
cmdprefix))
self.cfg.update('prebuildopts', cmdprefix)

cmd = "%s %s setup.py build --fcompiler=gnu95" % (cmdprefix, self.python_cmd)
self.cfg.update('buildopts', "--fcompiler=gnu95")

else:
raise EasyBuildError("Unknown family of compilers being used: %s", comp_fam)

cmd = "%s %s setup.py build %s" % (self.cfg['prebuildopts'], self.python_cmd, self.cfg['buildopts'])
run_cmd(cmd, log_all=True, simple=True)