Skip to content

Commit 5406393

Browse files
committed
update template for wrapper
1 parent f33e6a8 commit 5406393

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

python/gtsam/gtsam.tpl

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
#include <pybind11/iostream.h>
1919
#include "gtsam/config.h"
2020
#include "gtsam/base/serialization.h"
21-
#include "gtsam/nonlinear/utilities.h" // for RedirectCout.
21+
#include "gtsam/base/utilities.h" // for RedirectCout.
2222

2323
// These are the included headers listed in `gtsam.i`
2424
{includes}
@@ -32,20 +32,24 @@
3232

3333
// Preamble for STL classes
3434
// TODO(fan): make this automatic
35-
#include "python/gtsam/preamble.h"
35+
#include "python/gtsam/preamble/{module_name}.h"
3636

3737
using namespace std;
3838

3939
namespace py = pybind11;
4040

41-
PYBIND11_MODULE({module_name}, m_) {{
41+
{submodules}
42+
43+
{module_def} {{
4244
m_.doc() = "pybind11 wrapper of {module_name}";
4345
46+
{submodules_init}
47+
4448
{wrapped_namespace}
4549

4650
// Specializations for STL classes
4751
// TODO(fan): make this automatic
48-
#include "python/gtsam/specializations.h"
52+
#include "python/gtsam/specializations/{module_name}.h"
4953

5054
}}
5155

0 commit comments

Comments
 (0)