diff --git a/.gitmodules b/.gitmodules index 8daf168a..a22a71b9 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,3 @@ [submodule "robotpy_build/pybind11"] path = robotpy_build/pybind11 - url = https://github.com/pybind/pybind11.git + url = https://github.com/rwgk/pybind11 diff --git a/robotpy_build/autowrap/render_pybind11.py b/robotpy_build/autowrap/render_pybind11.py index bdc5df04..483bb74d 100644 --- a/robotpy_build/autowrap/render_pybind11.py +++ b/robotpy_build/autowrap/render_pybind11.py @@ -338,6 +338,8 @@ def cls_decl(r: RenderBuffer, cls: ClassContext): class_params.append( f"std::unique_ptr" ) + else: + class_params.append("py::smart_holder") if cls.trampoline: class_params.append(cls.trampoline.var) diff --git a/robotpy_build/command/build_ext.py b/robotpy_build/command/build_ext.py index de8e6709..135e3e21 100644 --- a/robotpy_build/command/build_ext.py +++ b/robotpy_build/command/build_ext.py @@ -134,7 +134,6 @@ def _spawn(cmd): self.compiler._rpy_spawn = self.compiler.spawn self.compiler.spawn = _spawn for ext in self.extensions: - ext.define_macros.append(("PYBIND11_USE_SMART_HOLDER_AS_DEFAULT", "1")) if debug: ext.define_macros.append( ("PYBIND11_ASSERT_GIL_HELD_INCREF_DECREF", "1") diff --git a/robotpy_build/pybind11 b/robotpy_build/pybind11 index d8b15411..ff7c0873 160000 --- a/robotpy_build/pybind11 +++ b/robotpy_build/pybind11 @@ -1 +1 @@ -Subproject commit d8b1541168e58444597f25e85e78356de9b67d34 +Subproject commit ff7c0873212be69f1203564363f1a32ef4a10cdf