Skip to content

Commit

Permalink
Find _inject.abi3.so relative to _memray.*.so
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
godlygeek committed Sep 25, 2024
1 parent 8becdd3 commit 44ec99f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/memray/commands/attach.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ def deactivate_because_timer_elapsed():

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

gdb_cmd = [
Expand Down

0 comments on commit 44ec99f

Please sign in to comment.