From a74f4adf1fde280fbbf41f14b36574c213eaf1d3 Mon Sep 17 00:00:00 2001 From: "Jonathan M. Waldrop" Date: Tue, 9 Sep 2025 14:28:41 -0500 Subject: [PATCH] Adds python dependency imports to relevant pybindings --- include/pluginplay/property_type/macros.hpp | 1 + include/pluginplay/python/py_type_info.hpp | 1 + src/python/export_pluginplay.cpp | 1 + src/python/module_manager/export_module_manager_class.cpp | 2 ++ 4 files changed, 5 insertions(+) diff --git a/include/pluginplay/property_type/macros.hpp b/include/pluginplay/property_type/macros.hpp index 8250366bc..39aada16a 100644 --- a/include/pluginplay/property_type/macros.hpp +++ b/include/pluginplay/property_type/macros.hpp @@ -143,6 +143,7 @@ inline auto prop_type<__VA_ARGS__>::results_() #define EXPORT_PROPERTY_TYPE(prop_type, m) \ + pybind11::module_::import("pluginplay"); \ pybind11::class_(m, #prop_type) \ .def(pybind11::init<>()) \ .def("type", \ diff --git a/include/pluginplay/python/py_type_info.hpp b/include/pluginplay/python/py_type_info.hpp index fc81bc16e..385cd4566 100644 --- a/include/pluginplay/python/py_type_info.hpp +++ b/include/pluginplay/python/py_type_info.hpp @@ -16,6 +16,7 @@ #pragma once #include +#include #include namespace pluginplay::python { diff --git a/src/python/export_pluginplay.cpp b/src/python/export_pluginplay.cpp index 0ab0ff243..9bc19fd72 100644 --- a/src/python/export_pluginplay.cpp +++ b/src/python/export_pluginplay.cpp @@ -26,6 +26,7 @@ namespace pluginplay { PYBIND11_MODULE(pluginplay, m) { + m.doc() = "PyPluginPlay: Python bindings for PluginPlay"; any::export_any(m); export_cache(m); export_fields(m); diff --git a/src/python/module_manager/export_module_manager_class.cpp b/src/python/module_manager/export_module_manager_class.cpp index 045741ee2..bee7f074d 100644 --- a/src/python/module_manager/export_module_manager_class.cpp +++ b/src/python/module_manager/export_module_manager_class.cpp @@ -33,6 +33,8 @@ void export_module_manager_class(py_module_reference m) { using py_obj = pybind11::object; using python::PythonWrapper; + py_module_type::import("parallelzone"); // For runtime interface + py_class_type(m, "ModuleManager") .def(pybind11::init<>()) .def(pybind11::init([](runtime_type rv, cache_pointer cache) {