From 0a55d34dfd980e7dcd04d5637b538320439046f5 Mon Sep 17 00:00:00 2001 From: Rolf Madsen Date: Fri, 28 Nov 2025 14:35:57 +0100 Subject: [PATCH 1/7] removed developers section --- README.md | 9 --------- 1 file changed, 9 deletions(-) diff --git a/README.md b/README.md index 9e20b68..f3d77c7 100644 --- a/README.md +++ b/README.md @@ -15,12 +15,3 @@ Pythonnet is used for integrating Python and C#. The original source can be foun This plugin depends on a fork of PythonNet: [PythonNet Fork](https://github.com/pythonnet/pythonnet/): https://github.com/rmadsen-ks/pythonnet - git commit: 338b01fac14e1f8a5882949970125fe817c2d8d3 - -__Developers__ -- Lim Jing Huey -- Kyler Lee -- Gordon Ong -- Jingwei Liang -- Joseph Hoff -- Navjodh Dhillon -- Rolf Madsen (*Maintainer* @rmadsen-ks, rolf_madsen@keysight.com) From 3ae4314e5c0d67a22031806f77de073ca56f3561 Mon Sep 17 00:00:00 2001 From: Rolf Madsen Date: Mon, 1 Dec 2025 20:41:09 +0100 Subject: [PATCH 2/7] deleted dependabot --- .github/dependabot.yml | 6 ------ 1 file changed, 6 deletions(-) delete mode 100644 .github/dependabot.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml deleted file mode 100644 index f95ace3..0000000 --- a/.github/dependabot.yml +++ /dev/null @@ -1,6 +0,0 @@ -version: 2 -updates: - - package-ecosystem: "nuget" # See documentation for possible values - directory: "/" # Location of package manifests - schedule: - interval: "weekly" From aed30a5e95aa03c4205bae539558f07fd0bbf4e4 Mon Sep 17 00:00:00 2001 From: Rolf Madsen Date: Tue, 27 Jan 2026 09:38:54 +0100 Subject: [PATCH 3/7] Bump version from 3.2.0 to 3.2.1 --- .gitversion | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitversion b/.gitversion index a3baba2..b440777 100644 --- a/.gitversion +++ b/.gitversion @@ -3,7 +3,7 @@ # This is the version number that will be used. Prerelease numbers are calculated by # counting git commits since the last change in this value. -version = 3.2.0 +version = 3.2.1 # A version is determined to be a "beta" prerelease if it originates from the default branch # The default branch is the first branch that matches the following regular expession. From 5dde5af0112c1ae39140ed75566457121b67e497 Mon Sep 17 00:00:00 2001 From: FrederikJA Date: Tue, 27 Jan 2026 09:39:33 +0100 Subject: [PATCH 4/7] Fix null reference exception in python discoverer (#216) --- OpenTap.Python/PythonInstallationDiscoverer.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/OpenTap.Python/PythonInstallationDiscoverer.cs b/OpenTap.Python/PythonInstallationDiscoverer.cs index d3bed78..babf6b9 100644 --- a/OpenTap.Python/PythonInstallationDiscoverer.cs +++ b/OpenTap.Python/PythonInstallationDiscoverer.cs @@ -49,6 +49,9 @@ static bool GetVersion(string libPath, out int major, out int minor) var sh = SharedLib.Load(libPath); + if (sh is null) + return false; + var versionSymbol = sh.GetSymbol("Py_GetVersion"); if (versionSymbol == IntPtr.Zero) return false; From ffa528a7fcdae3123fe34cef76ffd117d7983cc5 Mon Sep 17 00:00:00 2001 From: FrederikJA Date: Tue, 27 Jan 2026 09:41:24 +0100 Subject: [PATCH 5/7] Add python discovery path (#215) * Add python discovery path --------- Co-authored-by: Rolf Madsen --- OpenTap.Python/PythonInstallationDiscoverer.cs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/OpenTap.Python/PythonInstallationDiscoverer.cs b/OpenTap.Python/PythonInstallationDiscoverer.cs index babf6b9..222cfa6 100644 --- a/OpenTap.Python/PythonInstallationDiscoverer.cs +++ b/OpenTap.Python/PythonInstallationDiscoverer.cs @@ -78,7 +78,8 @@ static IEnumerable GetPythonsInFolder(string folderPath) List pys = new List(); foreach (var dir in Directory.GetDirectories(folderPath)) { - if (Path.GetFileName(dir).Contains("Python")) + string fileName = Path.GetFileName(dir); + if (fileName.ToLower().Contains("python")) { pys.Add(dir); } @@ -104,8 +105,10 @@ static IEnumerable LocatePythonsWin32() var programFiles5 = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), "Programs", "Python"); var programFiles6 = Environment.GetFolderPath(Environment.SpecialFolder.ProgramFiles); + var programFiles7 = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), + "Python"); - return drives.Concat(new[] { programFiles, programFiles6, programFiles2, programFiles3, programFiles4, programFiles5 }) + return drives.Concat(new[] { programFiles, programFiles2, programFiles3, programFiles4, programFiles5, programFiles6, programFiles7 }) .SelectMany(GetPythonsInFolder).Distinct().ToArray(); } @@ -242,4 +245,4 @@ static IEnumerable TryFindPythons(string path) } } } -} \ No newline at end of file +} From aa2700a035ba17020105160d3c80b0795bbdd63f Mon Sep 17 00:00:00 2001 From: Rolf Madsen Date: Thu, 12 Mar 2026 14:16:03 +0100 Subject: [PATCH 6/7] testing using alpine --- .github/workflows/build.yml | 25 ++++++++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 9cbb5cf..833b4b8 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -100,9 +100,28 @@ jobs: run: | pip install numpy ./bin/Debug/tap run bin/Debug/test.TapPlan --non-interactive - - - + test-alpine: + runs-on: ubuntu-latest + container: + image: alpine:3.21 + steps: + - name: Install dependencies + run: | + apk add --no-cache \ + bash git python3 py3-pip py3-numpy \ + dotnet-sdk-8.0 \ + icu-libs + - name: Checkout + uses: actions/checkout@v4 + - name: Restore dependencies + run: dotnet restore + - name: Build + run: dotnet build --no-restore + - name: Test + run: ./bin/Debug/tap python test + - name: Test Plan + run: ./bin/Debug/tap run bin/Debug/test.TapPlan --non-interactive + publish-package: if: github.ref == 'refs/heads/dev' || contains(github.ref, 'refs/heads/release') || contains(github.ref, 'refs/tags/v') environment: packages.opentap.io From eb8f477df82a16719c102ee148549f7b1ca1a464 Mon Sep 17 00:00:00 2001 From: Rolf Madsen Date: Thu, 12 Mar 2026 14:39:14 +0100 Subject: [PATCH 7/7] Added /usr/lib as a search path. (#217) * Added /usr/lib as a search path. * testing on alpine --- .github/workflows/build.yml | 2 +- OpenTap.Python/PythonInstallationDiscoverer.cs | 9 +++++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 833b4b8..e38c5d4 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -108,7 +108,7 @@ jobs: - name: Install dependencies run: | apk add --no-cache \ - bash git python3 py3-pip py3-numpy \ + bash git python3 python3-dev py3-pip py3-numpy \ dotnet-sdk-8.0 \ icu-libs - name: Checkout diff --git a/OpenTap.Python/PythonInstallationDiscoverer.cs b/OpenTap.Python/PythonInstallationDiscoverer.cs index 222cfa6..a40b855 100644 --- a/OpenTap.Python/PythonInstallationDiscoverer.cs +++ b/OpenTap.Python/PythonInstallationDiscoverer.cs @@ -181,9 +181,14 @@ static IEnumerable LocatePythonsWin32() } } - else + else // Assume OS is Linux { - foreach(var basePath in new [] {"/usr/lib/x86_64-linux-gnu/", "/usr/lib/aarch64-linux-gnu/"} + foreach(var basePath in new [] { + "/usr/lib/x86_64-linux-gnu/", + "/usr/lib/aarch64-linux-gnu/", + "/usr/lib/" // alpine linux + + } .Where(Directory.Exists)) foreach (var python in TryFindPythons(basePath)) {