Skip to content

Commit

Permalink
Merge pull request #23 from lsst/tickets/DM-14828
Browse files Browse the repository at this point in the history
DM-14828: Update pybind11 wrappers for 2.2
  • Loading branch information
r-owen committed Jul 21, 2018
2 parents dfb4e95 + c7d5c94 commit db64038
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 10 deletions.
6 changes: 1 addition & 5 deletions python/lsst/meas/extensions/shapeHSM/hsmMomentsControl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,10 @@ namespace meas {
namespace extensions {
namespace shapeHSM {

PYBIND11_PLUGIN(hsmMomentsControl) {
PYBIND11_MODULE(hsmMomentsControl, mod) {
py::module::import("lsst.afw.table");
py::module::import("lsst.meas.base");

py::module mod("hsmMomentsControl");

/* Module level */
py::class_<HsmMomentsAlgorithm, std::shared_ptr<HsmMomentsAlgorithm>, base::SimpleAlgorithm>
clsHsmMomentsAlgorithm(mod, "HsmMomentsAlgorithm");
Expand Down Expand Up @@ -70,8 +68,6 @@ PYBIND11_PLUGIN(hsmMomentsControl) {
LSST_DECLARE_CONTROL_FIELD(clsHsmSourceMomentsControl, HsmSourceMomentsControl, addFlux);

clsHsmMomentsAlgorithm.def("fail", &HsmMomentsAlgorithm::fail);

return mod.ptr();
}

} // shapeHSM
Expand Down
6 changes: 1 addition & 5 deletions python/lsst/meas/extensions/shapeHSM/hsmShapeControl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,10 @@ namespace meas {
namespace extensions {
namespace shapeHSM {

PYBIND11_PLUGIN(hsmShapeControl) {
PYBIND11_MODULE(hsmShapeControl, mod) {
py::module::import("lsst.afw.table");
py::module::import("lsst.meas.base");

py::module mod("hsmShapeControl");

/* Module level */
py::class_<HsmShapeAlgorithm, std::shared_ptr<HsmShapeAlgorithm>, base::SimpleAlgorithm>
clsHsmShapeAlgorithm(mod, "HsmShapeAlgorithm");
Expand Down Expand Up @@ -86,8 +84,6 @@ PYBIND11_PLUGIN(hsmShapeControl) {

clsHsmShapeAlgorithm.def("measure", &HsmShapeAlgorithm::measure);
clsHsmShapeAlgorithm.def("fail", &HsmShapeAlgorithm::fail);

return mod.ptr();
}

} // shapeHSM
Expand Down

0 comments on commit db64038

Please sign in to comment.