From bd4df6f7702f0d881ce83e55497b1e5a45e974b9 Mon Sep 17 00:00:00 2001 From: Omar Date: Fri, 22 Sep 2023 13:32:49 +0300 Subject: [PATCH] Fix issue in Windows python bindings --- .github/workflows/build.yml | 2 +- interop/python/replacement.py | 5 ++++- interop/python/setup.py | 4 ++-- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index a96696ac..59aa19bd 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -514,7 +514,7 @@ jobs: ./interop/python/radix_engine_toolkit/x86_64-unknown-linux-gnu cp \ ./artifacts/radix-engine-toolkit-uniffi-x86_64-pc-windows-gnu/radix_engine_toolkit_uniffi.dll \ - ./interop/python/radix_engine_toolkit/x86_64-pc-windows-gnu + ./interop/python/radix_engine_toolkit/x86_64-pc-windows-gnu.dll - name: Build Package working-directory: ./interop/python/ run: python3 -m build --wheel diff --git a/interop/python/replacement.py b/interop/python/replacement.py index 4ef00dba..b6ae62ec 100644 --- a/interop/python/replacement.py +++ b/interop/python/replacement.py @@ -30,7 +30,10 @@ def library_file_name() -> str: elif is_arm and system == "Linux": return "aarch64-unknown-linux-gnu" elif is_x86 and system == "Windows": - return "x86_64-pc-windows-gnu" + # Either Windows or the Python runtime on Windows requires that DLLs + # have an extension of `.dll`. This is why this is the only dynamic + # library with an extension. + return "x86_64-pc-windows-gnu.dll" else: raise NotImplemented(f"No implementation of the Radix Engine Toolkit is available on your platform. Information detected: is_x86: {is_x86}, is_arm: {is_arm}, os: {system}") diff --git a/interop/python/setup.py b/interop/python/setup.py index 312b3da8..1bc00a50 100644 --- a/interop/python/setup.py +++ b/interop/python/setup.py @@ -5,7 +5,7 @@ setuptools.setup( name="radix-engine-toolkit", - version="0.12.1dev3", + version="0.12.1dev4", packages=["radix_engine_toolkit"], author="radixdlt", description="A Python wrapper around the Radix Engine Toolkit that provides Radix Ledger primitives to Python.", @@ -24,7 +24,7 @@ "aarch64-apple-darwin", "aarch64-unknown-linux-gnu", "x86_64-apple-darwin", - "x86_64-pc-windows-gnu", + "x86_64-pc-windows-gnu.dll", "x86_64-unknown-linux-gnu", ] },