Skip to content

Conversation

@yungyuc
Copy link
Member

@yungyuc yungyuc commented Jun 26, 2022

The "base" _modmesh Python extension module was built in a separate shared object and loaded into the viewer binary. Some object files need to be linked in the two images. It is unnecessarily complex. Embedding the "base" Python extension module in the same way that the "_modmesh_view" module is embedded to the viewer executable simplifies the linkage.

The pure Python module (package) modmesh is changed accordingly. When it is used without the Qt viewer, it still tries to load the _modmesh extension module relatively.

…able

The "base" _modmesh Python extension module was built in a separate shared object and loaded into the viewer binary.  Some object files need to be linked in the two images.  It is unnecessarily complex.  Embedding the "base" Python extension module in the same way that the "_modmesh_view" module is embedded to the viewer executable simplifies the linkage.

The pure Python module (package) `modmesh` is changed accordingly.  When it is used without the Qt viewer, it still tries to load the `_modmesh` extension module relatively.
@yungyuc yungyuc added refactor Change code without changing tests pilot GUI and visualization labels Jun 26, 2022
@yungyuc yungyuc self-assigned this Jun 26, 2022
#include <modmesh/view/view.hpp>

PYBIND11_EMBEDDED_MODULE(_modmesh_view, mod)
PYBIND11_EMBEDDED_MODULE(_modmesh, mod) // NOLINT
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Embed _modmesh to the viewer executable.

OneTimeInitializer & operator=(OneTimeInitializer &&) = delete;
~OneTimeInitializer() = default;

#ifdef IAMWWRONG
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Dead code that I forgot to delete. Will delete it in the next commit.

@yungyuc yungyuc merged commit 3b769a4 into solvcon:master Jun 26, 2022
@yungyuc yungyuc deleted the refactor/single-image branch June 26, 2022 13:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pilot GUI and visualization refactor Change code without changing tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant