From 76e8e5dc54d3eab14d9c1a752647fa0ca07ba9b9 Mon Sep 17 00:00:00 2001 From: zalox Date: Mon, 6 May 2019 21:17:21 +0200 Subject: [PATCH] add paths for windows in test environment --- tests/stubs/plugins.cc | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/tests/stubs/plugins.cc b/tests/stubs/plugins.cc index 0c7dec5..10b5b94 100644 --- a/tests/stubs/plugins.cc +++ b/tests/stubs/plugins.cc @@ -1,7 +1,16 @@ #include "plugins.h" #include "python_module.h" -Plugins::Plugins() : jucipp_module("Jucipp", Module::init_jucipp_module) {} +Plugins::Plugins() : jucipp_module("Jucipp", Module::init_jucipp_module) { +#ifdef PYTHON_HOME_DIR +#ifdef _WIN32 + const std::wstring python_home(PYTHON_HOME_DIR); + const std::wstring python_path(python_home + L";" + python_home + L"\\lib-dynload;" + python_home + L"\\site-packages" ); + Py_SetPythonHome(python_home.c_str()); + Py_SetPath(python_path.c_str()); +#endif +#endif +} void Plugins::load() {}