From 61ba685022e2d9764c6df00a4a5a41795f014330 Mon Sep 17 00:00:00 2001 From: NissimHadar Date: Thu, 1 Nov 2018 12:17:53 -0700 Subject: [PATCH] Set Python command to `usr/local/python3`. --- tools/auto-tester/src/PythonInterface.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/tools/auto-tester/src/PythonInterface.cpp b/tools/auto-tester/src/PythonInterface.cpp index c5878939cc..9832ac9f8d 100644 --- a/tools/auto-tester/src/PythonInterface.cpp +++ b/tools/auto-tester/src/PythonInterface.cpp @@ -14,6 +14,7 @@ #include PythonInterface::PythonInterface() { +#ifdef Q_OS_WIN if (QProcessEnvironment::systemEnvironment().contains("PYTHON_PATH")) { QString _pythonPath = QProcessEnvironment::systemEnvironment().value("PYTHON_PATH"); if (!QFile::exists(_pythonPath + "/" + _pythonExe)) { @@ -27,6 +28,14 @@ PythonInterface::PythonInterface() { "Please set PYTHON_PATH to directory containing the Python executable"); exit(-1); } +#elif defined Q_OS_MAC + _pythonCommand = "/usr/local/bin/python3"; + if (!QFile::exists(_pythonCommand)) { + QMessageBox::critical(0, "PYTHON_PATH not defined", + "python3 not found at " + _pythonCommand); + exit(-1); + } +#endif } QString PythonInterface::getPythonCommand() {