From 81ae5688d48fe9037f431b5cb8e1c9cee07f22b9 Mon Sep 17 00:00:00 2001 From: wmayer Date: Thu, 23 May 2019 23:28:33 +0200 Subject: [PATCH] replace raw string with normal C string to fix build failure --- src/Base/Interpreter.cpp | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/src/Base/Interpreter.cpp b/src/Base/Interpreter.cpp index 7532dc8f18..6c1369d5ce 100644 --- a/src/Base/Interpreter.cpp +++ b/src/Base/Interpreter.cpp @@ -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