From e6c3c645ef79b8c5fc9e4370e018ae4d9a663c5c Mon Sep 17 00:00:00 2001 From: Alan Garny Date: Fri, 22 Nov 2019 10:03:41 +1300 Subject: [PATCH 1/3] Python support: update the PATH using `\` rather than `/` on Windows (#2219). --- .../support/PythonSupport/src/pythonsupportplugin.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/plugins/support/PythonSupport/src/pythonsupportplugin.cpp b/src/plugins/support/PythonSupport/src/pythonsupportplugin.cpp index 3f31c1433d..920c6e33e3 100644 --- a/src/plugins/support/PythonSupport/src/pythonsupportplugin.cpp +++ b/src/plugins/support/PythonSupport/src/pythonsupportplugin.cpp @@ -119,7 +119,7 @@ void PythonSupportPlugin::initializePlugin() } #endif - qputenv("PYTHONHOME", pythonHome.toUtf8()); + qputenv("PYTHONHOME", QDir::toNativeSeparators(pythonHome).toUtf8()); // Update our system PATH by prepending our Python script directories to it @@ -129,13 +129,13 @@ void PythonSupportPlugin::initializePlugin() static const char PathSeparator = ':'; #endif - QByteArray path = (pythonHome+"/bin").toUtf8()+PathSeparator+qgetenv("PATH"); + QString path = pythonHome+"/bin"+PathSeparator+qEnvironmentVariable("PATH"); #ifdef Q_OS_WIN path = (pythonHome+"/Scripts").toUtf8()+PathSeparator+path; #endif - qputenv("PATH", path); + qputenv("PATH", QDir::toNativeSeparators(path).toUtf8()); // Ensure that the user's Python site directory (in ~/.local, etc.) isn't // used From 5fc09367422414f52e655e280452d00702c7f3ea Mon Sep 17 00:00:00 2001 From: Alan Garny Date: Fri, 22 Nov 2019 10:06:34 +1300 Subject: [PATCH 2/3] Slight update to our downloads page (#2219). --- doc/downloads/index.js | 1 + 1 file changed, 1 insertion(+) diff --git a/doc/downloads/index.js b/doc/downloads/index.js index 14e08b945a..e330a0c439 100644 --- a/doc/downloads/index.js +++ b/doc/downloads/index.js @@ -38,6 +38,7 @@ var jsonData = { "versions": [ ], "changes": [ { "change": "General: added (initial) support for Python (see issue #1255)." }, + { "change": "Python support: update the PATH using \\ rather than / on Windows (see issue #2219)." }, { "change": "SED-ML support: added support left and right triangle symbols (see issue #2173)." }, { "change": "Simulation Experiment view: properly handle the Graph Panel properties (see issue #2171). Make sure that curves are plotted with all of their original settings when reloading a SED-ML file (see issue #2176). Make sure that all of a solver's properties get saved to a SED-ML file (see issue #2185)." }, { "change": "Third-party libraries: upgraded the OpenSSL library to version 1.1.1d (see issue #2157). Upgraded LLVM+Clang to version 9.0.0 (see issue #2161). Upgraded Mesa to version 19.2.1 (see issue #2197). Upgraded the SUNDIALS library to version 5.0.0 (see issue #2198). Upgraded QScintilla to version 2.11.3 (see issue #2208)." } From 6a34f01f007ad6a219211f6ea48c43458588411e Mon Sep 17 00:00:00 2001 From: Alan Garny Date: Fri, 22 Nov 2019 10:18:04 +1300 Subject: [PATCH 3/3] Python support: update the PATH using `\` rather than `/` on Windows (#2219). --- src/plugins/support/PythonSupport/src/pythonsupportplugin.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/plugins/support/PythonSupport/src/pythonsupportplugin.cpp b/src/plugins/support/PythonSupport/src/pythonsupportplugin.cpp index 920c6e33e3..acfa04b955 100644 --- a/src/plugins/support/PythonSupport/src/pythonsupportplugin.cpp +++ b/src/plugins/support/PythonSupport/src/pythonsupportplugin.cpp @@ -26,9 +26,7 @@ along with this program. If not, see . //============================================================================== #include -#if defined(Q_OS_WIN) || defined(Q_OS_LINUX) - #include -#endif +#include //==============================================================================