I have taken on responsibility for a large project that has existed for quite a while now in our company. One of the open tasks is to create a working setup.py for it and install it and its sub-packages in site-packages or dist-packages.
It contains executable scripts that get installed into bin (of the active virtualenv if there is one).
I can already install the whole project in site-packages using distutils respectively python setup.py install. However, since the project up to now has banked on the existence of a very specific directory structure I have to kind of reverse engineer how the scripts deal with the directory structure and fix any path voodoo so that eventually everything will work with the installed packages.
For this purpose I would like to know if there is a way to use pyCharm to debug the project in its installed state. That is, I have the project opened in its source directory (its git clone) where I also execute the setup.py. The project's scripts work perfectly from there because said specific directory structure is available.
So I would like to debug all the project's scripts in the context of the installed packages (library) instead of the source folder, maybe also edit them directly in the library folder, but keep everything in sync with the source folder.
Does this make sense? Is this possible? Or are there other methods, maybe even a royal road of debugging bugs/errors related to the folder structure in projects that get installed to the local Python library?