Skip to content
Snippets Groups Projects

[python] Add mechanism to register external Pyhton modules to dune-py

1 unresolved thread

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

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • added python label

  • Timo Koch added 17 commits

    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

    Compare with previous version

    • @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 of dumux.__init__.py so that dune-py gets to know about it and that works because dumux uses the install_python cmake function and consequently has the required metadata file? Due to some more whitespace type changes (package instead of package.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.

    • Author Owner

      The idea if I understand correctly is to call dune.common.registerExternalModule('dumux') at the top of dumux.__init__.py so that dune-py gets to know about it and that works because dumux uses the install_python cmake function and consequently has the required metadata file?

      Exactly.

      Due to some more whitespace type changes (package instead of package.name for example)

      It's because the extract meta data part is now a function where you give package.name as an argument.

    • Please register or sign in to reply
  • Timo Koch added 1 commit

    added 1 commit

    • 0e8c5ed8 - [python] Improve debug output from cmakebuilder

    Compare with previous version

  • Andreas Dedner mentioned in commit 0cac44a9

    mentioned in commit 0cac44a9

Please register or sign in to reply
Loading