diff --git a/pyproject.toml b/pyproject.toml index 676a3a1fb4fa49692df16433ea2d80ee90b84aca..7a8c0abdfe3766c17f5fe7a507448185afb9198f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,3 +1,3 @@ [build-system] -requires = ['setuptools', 'wheel', 'scikit-build', 'cmake', 'ninja', 'requests', 'portalocker', 'numpy'] +requires = ['setuptools', 'wheel', 'scikit-build', 'cmake', 'ninja', 'requests', 'portalocker', 'numpy', 'portalocker', 'numpy', 'wheel', 'mpi4py'] build-backend = 'setuptools.build_meta' diff --git a/python/dune/generator/builder.py b/python/dune/generator/builder.py index 5e0c185b944241bbc4187e059b619695e2cbe045..b96b02e07763bb1d3f876662b3f07a260d84bba8 100644 --- a/python/dune/generator/builder.py +++ b/python/dune/generator/builder.py @@ -103,18 +103,13 @@ class Builder: # module must be generated so lock the source file with Lock(os.path.join(self.dune_py_dir, 'lock-'+moduleName+'.lock'), flags=LOCK_EX): sourceFileName = os.path.join(self.generated_dir, moduleName + ".cc") -<<<<<<< HEAD - if not os.path.isfile(sourceFileName): - logger.info("Compiling " + pythonName) -======= line = "dune_add_pybind11_module(NAME " + moduleName + " EXCLUDE_FROM_ALL)" # first check if this line is already present in the CMakeLists file # (possible if a previous script was stopped by user before module was compiled) with open(os.path.join(self.generated_dir, "CMakeLists.txt"), 'r') as out: found = line in out.read() if not os.path.isfile(sourceFileName) or not found: - logger.info("Loading " + pythonName + " (new)") ->>>>>>> b73437ddb... also make new module if line in CMakeLists is missing + logger.info("Compiling " + pythonName) code = str(source) with open(os.path.join(sourceFileName), 'w') as out: out.write(code)