Skip to content
Snippets Groups Projects
Commit f441811f authored by Andreas Dedner's avatar Andreas Dedner
Browse files

disable haveAssert for now. It doesn't work as advertised for now

parent f1e21976
Branches
Tags
1 merge request!960refactor the way python is used in dune
......@@ -16,6 +16,12 @@ def assertHave(identifier):
provided the config file by calling
assertHave("HAVE_DUNE_COMMON")
'''
# the following simply will not work anymore - the issue is that the
# approach used here requires dune-py to have already been setup before
# calling 'assertHave' that is not guaranteed to be the case.
# Possibly we can use the 'metadata' file instead.
# We simply return for now
return
config = os.path.join(dune.common.module.get_dune_py_dir(), "config.h")
if not os.path.isfile(config):
raise ConfigurationError("dune-py not configured yet")
......
......@@ -197,7 +197,7 @@ class Builder:
if nlines > 1:
self.savedOutput[1].write("\n###############################\n")
def load(self, moduleName, source, pythonName, extraCMake):
def load(self, moduleName, source, pythonName, extraCMake=None):
## TODO replace if rank with something better
## and remove barrier further down
if not self.initialized:
......@@ -227,8 +227,9 @@ class Builder:
# store original file size
origPos = out.tell()
out.write(line+"\n")
for x in extraCMake:
out.write(x.replace("TARGET",moduleName)+"\n")
if extraCMake is not None:
for x in extraCMake:
out.write(x.replace("TARGET",moduleName)+"\n")
# update build system
logger.debug("Rebuilding module")
try:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment