Skip to content

Commit

Permalink
Merge pull request #334 from NWChemEx/export_pp_examples_patch
Browse files Browse the repository at this point in the history
Use `EXPORT_PLUGIN` in `pluginplay_examples`
  • Loading branch information
jwaldrop107 authored Jan 18, 2024
2 parents 8d7f502 + edf1be2 commit 5c310ae
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions tests/python/doc_snippets/export_pluginplay_examples.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@
#include "../../cxx/doc_snippets/force.hpp"
#include "../../cxx/doc_snippets/load_modules.hpp"
#include "../../cxx/doc_snippets/point_charge.hpp"
#include <pluginplay/plugin/plugin.hpp>
#include <pybind11/operators.h>
#include <pybind11/pybind11.h>

namespace pluginplay_examples {

PYBIND11_MODULE(pluginplay_examples, m) {
EXPORT_PLUGIN(pluginplay_examples, m) {
pybind11::class_<PointCharge>(m, "PointCharge")
.def(pybind11::init<>())
.def(pybind11::init<double, Point>())
Expand All @@ -32,7 +32,6 @@ PYBIND11_MODULE(pluginplay_examples, m) {
.def(pybind11::self == pybind11::self)
.def(pybind11::self < pybind11::self);

m.def("load_modules", &load_modules);
EXPORT_PROPERTY_TYPE(ElectricField, m);
EXPORT_PROPERTY_TYPE(Force, m);
}
Expand Down

0 comments on commit 5c310ae

Please sign in to comment.