py-spy icon indicating copy to clipboard operation
py-spy copied to clipboard

py-spy fails to find native source files when package installed as "development" option

Open gobater opened this issue 2 years ago • 1 comments

I'm developing a mixed (C and PY) python extension.

In order to speed up development, I do install the PY files into site-packages of my venv: so I use pip install -e .. If I do so, py-spy fails to follow the link to the (C) source files and the symbols of my native code are not displayed in the flamegraph

gobater avatar Feb 08 '23 09:02 gobater

I had a similar problem, and I solved it by adding --no-build-isolation and --no-deps to the pip install such that the compilation of your package relies on the C modules actually installed in your venv (which I imagine you compiled with debug symbols) instead of re-building everything in a sandbox. If you do this, you should pre-install everything that is required.

andryandrew avatar Mar 10 '23 02:03 andryandrew