GitHub link: https://github.com/Svtter/2InOne
Could two packages share same folder? The answer is yes.
- packagea is in
apps
- packageb is in
apps
And the mainc installed them all, run src/main.py successfully.
The folder tree is:
├── mainc
│ ├── poetry.lock
│ ├── pyproject.toml
│ └── src
│ └── main.py
├── packagea
│ ├── apps
│ │ └── packagea
│ └── pyproject.toml
├── packageb
│ ├── apps
│ │ └── packageb
│ └── pyproject.toml
└── readme.md
The main.py
is:
from apps.packagea.a import printa
from apps.packageb.b import printb
if __name__ == "__main__":
printa()
printb()