[python] Add mechanism to register external Pyhton modules to dune-py
The function dune.common.registerExternalModule(module) has to be actively called in the downstream module to register an external package. This triggers the reconfiguration of dune-py in case dune-py has already been created.
Ideally registerExternalModule
is called before any code generation (and therefore the creation of dune-py takes place) but the implementation also works if a module is registered after. In that case, a reconfiguration of dune-py is triggered.
Fixes #274 (closed)
Merge request reports
Activity
added python label
assigned to @andreas.dedner
added 17 commits
-
4b6111e4...b09d1048 - 12 commits from branch
master
- db4c6bed - [python] Make it possible to relaod the dune-py builder
- fc6680e7 - [python] Add mechanism to register external Pyhton modules to dune-py
- 9bf40c55 - [python][cleanup] Remove unused imports in module.py
- 9fbb4bb1 - [python] Improve debug output from cmakebuilder
- fae90d8b - [python][cleanup] Remove unused imports in packagemetadata.py
Toggle commit list-
4b6111e4...b09d1048 - 12 commits from branch
@tkoch thanks for looking into this - seems like a reasonable solution. The idea if I understand correctly is to call
dune.common.registerExternalModule('dumux')
at the top ofdumux.__init__.py
so thatdune-py
gets to know about it and that works becausedumux
uses theinstall_python
cmake function and consequently has the required metadata file? Due to some more whitespace type changes (package
instead ofpackage.name
for example) it's not that easy to see exactly what all the changes do. From what I could see it looks good to go. I'll run my test suite with the changes and perhaps the full nightly build just to make sure.The idea if I understand correctly is to call
dune.common.registerExternalModule('dumux')
at the top ofdumux.__init__.py
so thatdune-py
gets to know about it and that works becausedumux
uses theinstall_python
cmake function and consequently has the required metadata file?Exactly.
Due to some more whitespace type changes (
package
instead ofpackage.name
for example)It's because the extract meta data part is now a function where you give package.name as an argument.
added 1 commit
- 0e8c5ed8 - [python] Improve debug output from cmakebuilder
mentioned in commit 0cac44a9