Skip to content

Commit e67980f

Browse files
authored
Fix deprecated API from Python 3.7 (#189)
This revision updates pybind11 commit to the recent one which fixes Python 3.7 API break due to deprecation. Since this has been warned at least since 3.6, even targeting 3.6 will prevent building Jet Framework (due to `-Werror`). This has been found by building Jet from the latest Miniconda environment. In addition to the commit ID bump, latest pybind11 also deprecates the use of PYBIND11_PLUGIN. Thus, this diff also fixes that issue as well.
1 parent e7e784d commit e67980f

2 files changed

Lines changed: 3 additions & 7 deletions

File tree

external/pybind11

Submodule pybind11 updated 169 files

src/python/main.cpp

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -100,10 +100,8 @@
100100

101101
namespace py = pybind11;
102102

103-
PYBIND11_PLUGIN(pyjet) {
104-
py::module m("pyjet", R"pbdoc(
105-
Fluid simulation engine for computer graphics applications
106-
)pbdoc");
103+
PYBIND11_MODULE(pyjet, m) {
104+
m.doc() = "Fluid simulation engine for computer graphics applications";
107105

108106
// Constants
109107
addConstants(m);
@@ -312,6 +310,4 @@ PYBIND11_PLUGIN(pyjet) {
312310
#else
313311
m.attr("__version__") = py::str("dev");
314312
#endif
315-
316-
return m.ptr();
317313
}

0 commit comments

Comments
 (0)