From acaa8f88597b87613c2dd5e8863aac0b626fa5ad Mon Sep 17 00:00:00 2001 From: Jared Duffey Date: Thu, 8 Aug 2024 11:12:08 -0400 Subject: [PATCH] BUG: Fixed python version check for existence of importlib.metadata (#1040) Signed-off-by: Jared Duffey --- wrapping/python/NxPythonEmbed/NxPythonEmbed/NxPythonEmbed.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wrapping/python/NxPythonEmbed/NxPythonEmbed/NxPythonEmbed.hpp b/wrapping/python/NxPythonEmbed/NxPythonEmbed/NxPythonEmbed.hpp index 723a227684..ef774df1e6 100644 --- a/wrapping/python/NxPythonEmbed/NxPythonEmbed/NxPythonEmbed.hpp +++ b/wrapping/python/NxPythonEmbed/NxPythonEmbed/NxPythonEmbed.hpp @@ -308,7 +308,7 @@ inline std::vector LoadPythonPlugins(const std::set& p inline py::module_ GetImportlibMetadata() { auto sys = py::module_::import("sys"); - if(sys.attr("version_info").attr("__lt__")(py::make_tuple(3, 10))) + if(sys.attr("version_info").attr("__lt__")(py::make_tuple(3, 10)).cast()) { return py::module_::import("importlib_metadata"); }