From 71a3143fd3a84629a0e4e691e30c6c63b8c26a48 Mon Sep 17 00:00:00 2001 From: foefl Date: Fri, 28 Mar 2025 15:05:39 +0100 Subject: [PATCH] change API to use SharpPython runtime path variable --- dopt.DeltaBarth.Tests/JsonStructsTest.cs | 3 ++- dopt.DeltaBarth.Tests/PluginTest.cs | 2 ++ dopt.DeltaBarth.Tests/dopt.DeltaBarth.Tests.csproj | 4 ---- dopt.DeltaBarth/Plugin.cs | 2 +- dopt.DeltaBarth/dopt.DeltaBarth.csproj | 8 ++------ 5 files changed, 7 insertions(+), 12 deletions(-) diff --git a/dopt.DeltaBarth.Tests/JsonStructsTest.cs b/dopt.DeltaBarth.Tests/JsonStructsTest.cs index 8ae8451..4aecb2f 100644 --- a/dopt.DeltaBarth.Tests/JsonStructsTest.cs +++ b/dopt.DeltaBarth.Tests/JsonStructsTest.cs @@ -8,7 +8,8 @@ namespace dopt.DeltaBarth.Tests internal class TestPlugin : DeltaBarth.Plugin { internal dynamic pyModJsonStructs; - internal TestPlugin() : base() { + private const string absPath = @"A:\Arbeitsaufgaben\Delta-Barth\cs-wrapper\dopt.DeltaBarth"; + internal TestPlugin() : base(absPath) { using (Py.GIL()) { pyModJsonStructs = Py.Import("delta_barth._csharp.json_types"); diff --git a/dopt.DeltaBarth.Tests/PluginTest.cs b/dopt.DeltaBarth.Tests/PluginTest.cs index 5b9cc18..612ebc4 100644 --- a/dopt.DeltaBarth.Tests/PluginTest.cs +++ b/dopt.DeltaBarth.Tests/PluginTest.cs @@ -37,6 +37,8 @@ namespace dopt.DeltaBarth.Tests } public class TPlugin : DeltaBarth.Plugin { + private const string absPath = @"A:\Arbeitsaufgaben\Delta-Barth\cs-wrapper\dopt.DeltaBarth"; + public TPlugin() : base(absPath) { } public new JsonStructs.Credentials GetCredentials() { return base.GetCredentials(); diff --git a/dopt.DeltaBarth.Tests/dopt.DeltaBarth.Tests.csproj b/dopt.DeltaBarth.Tests/dopt.DeltaBarth.Tests.csproj index 2270bca..74d6b16 100644 --- a/dopt.DeltaBarth.Tests/dopt.DeltaBarth.Tests.csproj +++ b/dopt.DeltaBarth.Tests/dopt.DeltaBarth.Tests.csproj @@ -23,10 +23,6 @@ - - python\%(RecursiveDir)/%(FileName)%(Extension) - PreserveNewest - PreserveNewest diff --git a/dopt.DeltaBarth/Plugin.cs b/dopt.DeltaBarth/Plugin.cs index ebb9b4d..610424d 100644 --- a/dopt.DeltaBarth/Plugin.cs +++ b/dopt.DeltaBarth/Plugin.cs @@ -7,7 +7,7 @@ namespace dopt.DeltaBarth { protected dynamic pyModManagement; protected dynamic pyModPipeline; - public Plugin() : base(verbose: false) + public Plugin(string runtimePath) : base(runtimePath: runtimePath, verbose: false) { base.Initialise(); using (Py.GIL()) diff --git a/dopt.DeltaBarth/dopt.DeltaBarth.csproj b/dopt.DeltaBarth/dopt.DeltaBarth.csproj index 2eaa8c7..09e7d06 100644 --- a/dopt.DeltaBarth/dopt.DeltaBarth.csproj +++ b/dopt.DeltaBarth/dopt.DeltaBarth.csproj @@ -6,15 +6,11 @@ enable x64 x64 - 0.1.0-alpha1 + 0.2.0 - - - python\%(RecursiveDir)/%(FileName)%(Extension) - PreserveNewest - +