I've reorganized my Python project to be under a same name umbrella. My project can now be seen as multiple subsystems than can depend on each other. That means that every submodule can now be distributed alone so that only required dependencies can be installed.
The old structure:
/
├─ myproj/
│ ├─ __init__.py
│ ├─ mod1.py
│ ├─ subpackage1/
│ └─ subpackage2/
└─ setup.py
The new structure:
/
├─ myproj/
│ ├─ common/
│ │ └─ mod1.py
│ ├─ subpackage1/
│ └─ subpackage2/
└─ setup.py
As you can see not much has changed except that myproj is now a namespace package and that sub-packages common, subpackage1 and subpackage2 can now be distributed independently.
Is it possible, still keeping one unique setup.py file, to create 3 independent packages?
myproj.commonmyproj.subpackage1myproj.subpackage2
Also I'd like to specify that when installing myproj.subpackage1, myproj.common is required or that myproj.subpackage2 will require both myproj.common and myproj.subpackage1.