Forráskód Böngészése

Fixed wrappers to pybind11

Former-commit-id: ef0d1319bb49771d7f109458f89fd4e03d62e446
s-koch 9 éve
szülő
commit
dd7a71323d
2 módosított fájl, 18 hozzáadás és 10 törlés
  1. 11 3
      python/python_shared.cpp
  2. 7 7
      python/python_shared.h

+ 11 - 3
python/python_shared.cpp

@@ -14,9 +14,17 @@ extern void python_export_igl_viewer(py::module &);
 extern void python_export_igl_comiso(py::module &);
 #endif
 
-PYTHON_PLUGIN(pyigl) {
-    py::init_threading();
-    py::module m("pyigl", "Python wrappers for libigl");
+PYBIND11_PLUGIN(pyigl) {
+    py::module m("pyigl", R"pyigldoc(
+        Python wrappers for libigl
+        --------------------------
+
+        .. currentmodule:: pyigl
+
+        .. autosummary::
+           :toctree: _generate
+
+    )pyigldoc");
 
     python_export_vector(m);
     python_export_igl(m);

+ 7 - 7
python/python_shared.h

@@ -1,11 +1,11 @@
 #pragma once
 
-#include <pybind/pybind.h>
-#include <pybind/operators.h>
-#include <pybind/complex.h>
-#include <pybind/numpy.h>
-#include <pybind/stl.h>
-#include <pybind/functional.h>
+#include <pybind11/pybind11.h>
+#include <pybind11/operators.h>
+#include <pybind11/complex.h>
+#include <pybind11/numpy.h>
+#include <pybind11/stl.h>
+#include <pybind11/functional.h>
 
 #include "py_doc.h"
 
@@ -83,4 +83,4 @@ void assert_is_Matrix4(const std::string name, const Eigen::PlainObjectBase<Scal
 
 
 
-namespace py = pybind;
+namespace py = pybind11;