It seems to indicate that one would be able to deactivate python (all these env buildings), but it is never used (Only set to OFF if Python is not found. OFF is the default anyway).
I propose to remove it.
BTW what is the recommended way to skip the python (I keep getting troubles...)? -DCMAKE_DISABLE_FIND_PACKAGE_Python3=ON?
Designs
Child items ...
Show closed items
Linked items 0
Link issues together to show that they're related.
Learn more.
I think the idea was that some people might want to use the 7nternal venv but not the bindings. So only bindings are turned off by setting enable bindings to false.
At the moment the only way to turn it completely off is as you suggested.
I'm using DUNE_ENABLE_PYTHONBINDING:BOOL=0 a lot, basically in all setups, because I don't use (and cannot use) anything from the bindings. But I might want to use python for something else, so deactivating python is no option.
I think it would be good to be able to enable/disable all three kinds of python support...
(a) just search for python and potentially enable some code to interact with python (e.g. embedding pythoon in C++)
(b) enable the venv
(c) enable the bindings
(b) and (c) are to some extent orthogonal and even (b) without (a), (b) could have some relevance.
An example of (b) alone could be some python based code
generator. Although not implemented yet, I planned to automatically
install the python TPMC library, when compiling the dune cut-cell
generation code. That would reduce the burdong of installing the TPMC
python code and passing the correct location to cmake.
An other future example could be the dune-codegen module, where
certain fenics packages are required and could automatically be added
to the venv.
yes. In a user-module I might have python + c++ code. The -DCMAKE_DISABLE_FIND_PACKAGE_Python3=ON deactivates python globally, so I cannot even run my own find_package(Python3) anymore.
I mentioned this issue in the description of the original python overhaul MR
!960 (merged)
I also think it would be better to have a less coarse mechanism to disable part of the python framework. For example, we could have a flag (e.g. DUNE_USE_PYTHON) which can be one of bindings, dune-env, off. Tthe off needs a bit more work perhaps - basically in the last case FindPython would be used but nothing more. CMAKE_DISABLE_FIND_PACKAGE_Python3 could of course still be used. The default would be bindings but the others can be used instead. This would then replace the old DUNE_ENABLE_PYTHONBINDING.