Imagine a main.py. I have the following structure
├── main.py
├── moduleX
│ ├── setup.py
│ ├── submoduleA
│ │ └── fileA.py
│ │ └── fileB.py
│ ├── submoduleC
│ │ └── fileC.py
Main calls moduleX.setup and setup needs to call functions from submodules A and B.
However moduleX.setup is unable to find the submodules and I don't know how to import them
So it goes like this: in main.py
import moduleX.setup
in setup.py
from submoduleA import fileA
from submoduleA import fileB
import submoduleC
and all submodules and files are not found.
All subfolders have empty init.py files. I am not sure how to fill them, seems like a recursive problem.
I tried adding moduleX to sys.path I tried prpending moduleX everywhere I tried using .. and .
I don't know what I am doing wrong.
__init__.pyand fill the file like:from .fileC import *