From 56631549d8bd95d5bd2ba16b13e200c8e2d6a2fd Mon Sep 17 00:00:00 2001 From: Alan Copeland Date: Thu, 4 Dec 2025 23:39:42 -0700 Subject: [PATCH] Update PythonInstallationDiscoverer.cs Add an environment variable to explicitly set the library path --- OpenTap.Python/PythonInstallationDiscoverer.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/OpenTap.Python/PythonInstallationDiscoverer.cs b/OpenTap.Python/PythonInstallationDiscoverer.cs index d3bed78..382ffc8 100644 --- a/OpenTap.Python/PythonInstallationDiscoverer.cs +++ b/OpenTap.Python/PythonInstallationDiscoverer.cs @@ -113,6 +113,12 @@ static IEnumerable LocatePythonsWin32() yield return (PythonSettings.Current.PythonLibraryPath, PythonSettings.Current.PythonPath, 1000); } + //pythonLibLocation alpine image. + if ((Environment.GetEnvironmentVariable("pythonLibLocation") ?? "") is string lib && File.Exists(lib)) + { + yield return (lib, "", 0); + } + //pythonLocation for github builds. if ((Environment.GetEnvironmentVariable("PYTHONHOME") ?? Environment.GetEnvironmentVariable("pythonLocation")) is string home && Directory.Exists(home)) {