Skip to content
Snippets Groups Projects
Commit 3ab1838b authored by Haocheng LIU's avatar Haocheng LIU
Browse files

BUG: Do not import module site when initializing python interpreter

This MR fix CMB test failures that caused by initializing python
environment incorrectly. If needed, user can import site module later
after initialization.
parent 835d4899
No related branches found
No related tags found
No related merge requests found
Pipeline #
......@@ -36,6 +36,10 @@ using boost::regex_search;
using boost::regex_match;
#endif
SMTK_THIRDPARTY_POST_INCLUDE
#if WIN32
#include <Python.h>
extern __declspec(dllimport) int Py_NoSiteFlag;
#endif
namespace
{
......@@ -72,6 +76,7 @@ void PythonInterpreter::initialize()
{
if (!this->isInitialized())
{
Py_NoSiteFlag = 1;
pybind11::initialize_interpreter();
// Add the contents of our python path list to the path
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment