Skip to content

Commit 44ec99f

Browse files
committed
Find _inject.abi3.so relative to _memray.*.so
With an editable `scikit-build-core` install, shared libraries are not in the same directory as Python files, so we can no longer locate it relative to `__init__.py`. Signed-off-by: Matt Wozniski <mwozniski@bloomberg.net>
1 parent 8becdd3 commit 44ec99f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/memray/commands/attach.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ def deactivate_because_timer_elapsed():
130130

131131
def inject(debugger: str, pid: int, port: int, verbose: bool) -> str | None:
132132
"""Executes a file in a running Python process."""
133-
injecter = pathlib.Path(memray.__file__).parent / "_inject.abi3.so"
133+
injecter = pathlib.Path(memray._memray.__file__).parent / "_inject.abi3.so"
134134
assert injecter.exists()
135135

136136
gdb_cmd = [

0 commit comments

Comments
 (0)