Skip to content

Commit

Permalink
Release version 2.9.0-rc3
Browse files Browse the repository at this point in the history
  • Loading branch information
Miepee committed Sep 28, 2024
1 parent d95d693 commit b529a60
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 2 deletions.
2 changes: 1 addition & 1 deletion YAMS-LIB/YAMS-LIB.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<Version>2.9.0-rc2</Version>
<Version>2.9.0-rc3</Version>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
Expand Down
33 changes: 33 additions & 0 deletions am2r_yams/wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,41 @@
# 2. While we figured out how to deal with non system installations via the DOTNET_ROOT env var,
# should we also provide a way to just pass a `dotnet_root` param to the wrapper which gets
# passed to pythonnet?
dotnet_os = "unknown"
dotnet_arch = "unknown"
system = platform.system()
if system == "Windows":
dotnet_os = "win"
elif system == "Darwin":
dotnet_os = "osx"
elif system == "Linux":
dotnet_os = "linux" # Might break for musl, I dont care.
else:
raise ValueError("Couldn't determine the OS handle for dotnet cleanup!")

arch = platform.machine()
if arch == "AMD64" or arch == "x86_64":
dotnet_arch = "x64"
elif arch == "arm64" or arch == "aarch64":
dotnet_arch = "arm64"
else:
raise ValueError("Couldn't determine the architecture handle for dotnet cleanup!")

dotnet_rid = dotnet_os + "-" + dotnet_arch

yams_path = os.fspath(Path(__file__).with_name(name="yams"))
sys.path.append(yams_path)
for os_dir in Path(__file__).parent.joinpath("yams", "runtimes").iterdir():
if not os_dir.is_dir():
continue
if os_dir.name != dotnet_rid:
continue

for dll in os_dir.iterdir():
if not dll.is_file():
continue
sys.path.append(os.fspath(dll))

from pythonnet import load, unload


Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"

[project]
name = "am2r_yams"
version = "2.9.0-rc2"
version = "2.9.0-rc3"
authors = [
{name = "Miepee"},
]
Expand Down

0 comments on commit b529a60

Please sign in to comment.