CON :
- Users have to give explicitly the list of required modules but the
error message gives all the modules to add
PRO :
- Does not hide automatic installed dependecies
(with the one module - one variant, a module can be installed and the corresponding variant set to false)
- Module dependencies is done when checking the arguments
- Does not tamper with spack resource fetching
Actually, make install already installs Python packages,
so there is no need to do it manually in a post-install hook.
Additionally, we set the DUNE_PY_DIR and DUNE_CONTROL_PATH
environment variables, so that the Python bindings work even
in presence of multiple installations.
Some of the variants/dependencies in the prototype were unneeded,
I went through also with a keen eye on keeping the total number
of variants a bit lower. I also added defaults that I consider
useful.
This adds a loop with versions around the resource definitions allowing
for multiple versions of the dune package with the expected behaviour
of dependency forwarding to Dune modules.
Additionally, it avoids the code duplication of _get_needed_resources:
It modifies the resource list to include the transitive closure of
Dune module dependencies and then calls the original implementation.