replace raw string with normal C string to fix build failure
This commit is contained in:
@@ -496,15 +496,16 @@ const char* InterpreterSingleton::init(int argc,char *argv[])
|
||||
Py_Initialize();
|
||||
const char* virtualenv = getenv("VIRTUAL_ENV");
|
||||
if (virtualenv) {
|
||||
PyRun_SimpleString(R"***(
|
||||
# Check for virtualenv, and activate if present. See https://virtualenv.pypa.io/en/latest/userguide/#using-virtualenv-without-bin-python
|
||||
import os
|
||||
import sys
|
||||
base_path = os.getenv("VIRTUAL_ENV")
|
||||
if not base_path is None:
|
||||
activate_this = os.path.join(base_path, "bin", "activate_this.py")
|
||||
exec(open(activate_this).read(), {'__file__':activate_this})
|
||||
)***");
|
||||
PyRun_SimpleString(
|
||||
"# Check for virtualenv, and activate if present.\n"
|
||||
"# See https://virtualenv.pypa.io/en/latest/userguide/#using-virtualenv-without-bin-python\n"
|
||||
"import os\n"
|
||||
"import sys\n"
|
||||
"base_path = os.getenv(\"VIRTUAL_ENV\")\n"
|
||||
"if not base_path is None:\n"
|
||||
" activate_this = os.path.join(base_path, \"bin\", \"activate_this.py\")\n"
|
||||
" exec(open(activate_this).read(), {'__file__':activate_this})\n"
|
||||
);
|
||||
}
|
||||
PyEval_InitThreads();
|
||||
#if PY_MAJOR_VERSION >= 3
|
||||
|
||||
Reference in New Issue
Block a user