I have a Python package that is released in pypi and can be installed via pip install.
I want to do some minor changes in that package that are only of use for me in my Pycharm project A. I expect that these changes will be quite frequent, so I want to be able to do these changes on the fly.
I know that I can work with a local copy of that project / package by doing the following steps:
perform a
git cloneuse that code as a separate Pycharm project B
in my own project A, I write:
import sys sys.path.insert(0, '/path/to/second_pycharm_project') import project_name
Now I can do code changes in the Pycharm project B and executing project A just reflects that correctly.
Nevertheless, I have some constraints:
- Variable / code lookup within Pycharm is not possible this way.
- Setting a breakpoint in project B has to be done within project A and seems to work only while entering the code of B during debugging.
My question is:
Is there any other (better) way to use another project within Pycharm?
(I thought of changing the code that gets copied by pip install in my virtual environment directly, but this seems very unclean and dangerous to me, in case my changes get accidentally overwritten by pip install)