From 527e8837e489ceedaff111c539b84a2a4e51b42e Mon Sep 17 00:00:00 2001 From: Alan Garny Date: Tue, 3 Dec 2019 16:24:15 +1300 Subject: [PATCH] Jupyter kernel: make sure that `implementation` and `implementation_version` are properly set (#2250). --- .../JupyterKernel/src/jupyterkernelplugin.cpp | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/src/plugins/miscellaneous/JupyterKernel/src/jupyterkernelplugin.cpp b/src/plugins/miscellaneous/JupyterKernel/src/jupyterkernelplugin.cpp index 8053487d9a..82d28a1654 100644 --- a/src/plugins/miscellaneous/JupyterKernel/src/jupyterkernelplugin.cpp +++ b/src/plugins/miscellaneous/JupyterKernel/src/jupyterkernelplugin.cpp @@ -26,6 +26,10 @@ along with this program. If not, see . //============================================================================== +#include + +//============================================================================== + namespace OpenCOR { namespace JupyterKernel { @@ -133,18 +137,20 @@ matplotlib.rcParamsOrig['backend'] = matplotlib.rcParams['backend'] # Minimal customisation of the standard IPython kernel class OpenCORKernel(IPythonKernel): - implementation = 'OpenCOR' - implementation_version = '0.6' + implementation = '%1' + implementation_version = '%2' banner = "Jupyter kernel for OpenCOR" if __name__ == '__main__': from ipykernel.kernelapp import IPKernelApp - IPKernelApp.connection_file = '%1' + IPKernelApp.connection_file = '%3' IPKernelApp.launch_instance(kernel_class=OpenCORKernel) )PYTHON"; - PythonQtSupport::evaluateScript(JupyterKernel.arg(QString(pArguments[0]).replace("\\", "\\\\"))); + PythonQtSupport::evaluateScript(JupyterKernel.arg(qApp->applicationName(), + qApp->applicationVersion(), + QString(pArguments[0]).replace("\\", "\\\\"))); return true; }