Imagine you are developing project A, and project A depends on project B which you are also developing. How can you locally develop both at the same time?
This repo just shows a very basic example of that in Python (tested with Python 3.8.8).
repo-b
-> This folder is an example of the repo for project B. It exposes a package called b.
repo-a
-> This folder is an example of the repo for project A. It imports and uses b.
Directions:
cd repo-b
python setup.py sdist bdist_wheel
(actually i don't know if this is necessary or not)cd repo-a
pip uninstall --yes b && pip install -e ~/repos/local-development-of-python-package-and-dep/repo-b
or similarpython main.py
and observe that everything worksSo the real secret is the -e
or --editable
flag.
References: