New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DM-25877: Change pybind11 to use a single importable module #26
Conversation
It's the >>> from lsst.sphgeom import HtmPixelization as H
>>> H(1)
HtmPixelization(1)
>>> H(1).pixel(10)
Segmentation fault: 11 The other methods from Pixelization seem to be okay. |
Not sure if this helps anyone:
|
Turns out Pim fixed this one in commit 63a0e91 which references pybind/pybind11#1132 which still seems to be open. |
All C++ classes are wrapped in the same module, resulting in decreased binary size and import time.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code looks good, but I'd prefer for some files to be renamed (especially the new sphgeom.h
header) to match existing conventions. It would be preferable to rename the module and the master source file to _sphgeom.cc
/_sphgeom.so
as well.
Thanks. I'll make those changes. Should be quick. |
Oh, and we may someday need to revert @pschella's workaround for the pybind11 holder issue and replace it with something more intrusive and unpleasant - the problem with this fix is that it prohibits downstream C++ code from using |
This is a rebase of the old pybind11-fat-wrapper branch from @smonkewitz . It builds fine but currently there is a segv in the pixelization test.