From c579a778c4efcbb0e4f3a37ac7672106a527b885 Mon Sep 17 00:00:00 2001 From: botbikamordehai2-sketch Date: Sun, 7 Jun 2026 11:19:47 +0000 Subject: [PATCH] fix: correct package_data paths for native library files (closes #228) --- setup.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/setup.py b/setup.py index 9e4a7b7a..a0b0cfaa 100644 --- a/setup.py +++ b/setup.py @@ -21,7 +21,8 @@ def finalize_options(self): def get_shared_library_data_to_include(): - # Return the correct uniffi C shared library extension for the given platform + # Return the correct uniffi C shared library extension for the given platform. + # Paths are relative to the onepassword package directory (src/onepassword/) include_path = "lib" machine_type = os.getenv("PYTHON_MACHINE_PLATFORM") or platform.machine().lower() if machine_type in ["x86_64", "amd64"]: @@ -42,7 +43,8 @@ def get_shared_library_data_to_include(): uniffi_bindings_file_name = "op_uniffi_core.py" uniffi_bindings_file_name = os.path.join(include_path, uniffi_bindings_file_name) - return [c_shared_library_file_name, uniffi_bindings_file_name] + # Return paths relative to the onepassword package (package_dir 'onepassword') + return [os.path.join("onepassword", f) for f in [c_shared_library_file_name, uniffi_bindings_file_name]] setup(