From a54147d0879bd399f26c0586c2c58e06abf3b881 Mon Sep 17 00:00:00 2001 From: Enrico Forestieri Date: Sat, 12 Jan 2019 18:37:41 +0100 Subject: [PATCH] Remove PYTHONPATH from the environment on Windows This make sure to use the the modules distributed with LyX, avoiding reconfigure failures. (cherry picked from commit ad0c9a548bf9e0c5038f2731aef766e0d0e8c266) --- src/support/os_win32.cpp | 5 +++++ status.23x | 3 +++ 2 files changed, 8 insertions(+) diff --git a/src/support/os_win32.cpp b/src/support/os_win32.cpp index 8d521383f2..6e5d6d8ca1 100644 --- a/src/support/os_win32.cpp +++ b/src/support/os_win32.cpp @@ -158,6 +158,11 @@ void init(int argc, char ** argv[]) */ + // Remove PYTHONPATH from the environment as it may point to an + // external python installation and cause reconfigure failures. + unsetEnv("PYTHONPATH"); + + #if defined(_MSC_VER) && (_MSC_VER >= 1900) // Removing an argument from argv leads to an assertion on Windows // when compiling with MSVC 2015 in debug mode (see bug #10440). diff --git a/status.23x b/status.23x index 08f5fcc124..7032895472 100644 --- a/status.23x +++ b/status.23x @@ -142,6 +142,9 @@ What's new * INTERNALS +- Fix reconfigure issues on Windows in the presence of an external + python installation. + * DOCUMENTATION AND LOCALIZATION -- 2.39.5