adamdebreceni commented on code in PR #1958:
URL: https://github.com/apache/nifi-minifi-cpp/pull/1958#discussion_r2030844774


##########
extensions/python/pythonlibloader/PythonLibLoader.cpp:
##########
@@ -37,8 +37,13 @@ class PythonLibLoader {
     if (auto python_binary = 
config->get(minifi::Configure::nifi_python_env_setup_binary)) {
       python_command = python_binary.value();
     }
+#if defined(__APPLE__)
+    std::string command = python_command +
+      R"###( -c "import sysconfig, os, glob; v = sysconfig.get_config_vars(); 
lib_dir = v['LIBDIR']; so_paths = glob.glob(f'{lib_dir}/*.dylib'); 
print(list(filter(os.path.exists, so_paths))[0])")###";
+#else
     std::string command = python_command +
       R"###( -c "import sysconfig, os, glob; v = sysconfig.get_config_vars(); 
lib_dir = v['LIBDIR']; ld_lib = v['LDLIBRARY']; so_paths = 
glob.glob(f'{lib_dir}/*{ld_lib}*'); 
so_paths.extend(glob.glob(f'{lib_dir}/*/*{ld_lib}*')); 
print(list(filter(os.path.exists, so_paths))[0])")###";

Review Comment:
   in my miniconda setup the so_paths contains a number of shared libraries



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to