From acc5a1a5fc1ac9805ca2ccf26f71b18c52debc02 Mon Sep 17 00:00:00 2001 From: Sam Scholten Date: Tue, 14 Oct 2025 15:59:18 +1000 Subject: Add detailed logging for libffi DLL search in PyInstaller spec --- PicoStream.spec | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/PicoStream.spec b/PicoStream.spec index f6fdcb9..2a03dd2 100644 --- a/PicoStream.spec +++ b/PicoStream.spec @@ -13,6 +13,16 @@ def find_libffi_dll(): if sys.platform != "win32": return [] + print("--- PyInstaller Build Environment ---") + print(f" - Python Executable: {sys.executable}") + print(f" - sys.prefix: {sys.prefix}") + if hasattr(sys, "base_prefix"): + print(f" - sys.base_prefix: {sys.base_prefix}") + else: + print(" - sys.base_prefix: Not available") + conda_prefix = os.environ.get("CONDA_PREFIX") + print(f" - CONDA_PREFIX env var: {conda_prefix}") + search_paths = [] # Active environment's DLLs directory search_paths.append(os.path.join(sys.prefix, "DLLs")) @@ -23,11 +33,14 @@ def find_libffi_dll(): search_paths.append(os.path.join(sys.base_prefix, "Library", "bin")) # Conda environment's directory (if CONDA_PREFIX is set) - conda_prefix = os.environ.get("CONDA_PREFIX") if conda_prefix: search_paths.append(os.path.join(conda_prefix, "Library", "bin")) - print("--- Searching for libffi DLL on Windows ---") + print("\n--- Potential Search Paths for libffi ---") + for p in search_paths: + print(f" - Path: {p}, Exists? {os.path.isdir(p)}") + + print("\n--- Searching for libffi DLL on Windows ---") unique_paths = sorted(list(set(p for p in search_paths if os.path.isdir(p)))) for path in unique_paths: -- cgit v1.2.3