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() {