I have a python package "fb" with the following file structure:
packageFolder
├── README.md
├── setup.py
└── fb
├── __init__.py
├── foo.py
└── fizz.py
__init__.py contains the following code:
from fb.foo import bar
from fb.fizz import buzz
The issue is that foo.py also needs to import buzz from fizz.py
For the PyPI install to work, foo.py needs to contain the line:
from fb.fizz import buzz
But for things to run locally for development, foo.py needs to instead contain:
from fizz import buzz
Reversing the import statements leads to a module import error in both cases.
What is the resolution to this issue?