<#20076 Does Pants support adding prefix namespace...
# github-notifications
c
#20076 Does Pants support adding prefix namespaces? New discussion created by Asmhoa Hello, my team has a python apps monorepo that looks like:
Copy code
umbrella/
├─ libs/
│  ├─ lib1/
│  │  ├─ setup.py
│  ├─ lib2/
│  │  ├─ setup.py
│  ├─ lib3/
│  │  ├─ setup.py
├─ apps/
│  ├─ app1/
│  │  ├─ src/
│  │  │  ├─ __init__.py
│  │  ├─ setup.py
│  ├─ app2/
│  │  ├─ setup.py
pants.toml
For each of these libs and apps, we want to include them in a namespace. For example,
umbrella/apps/app1/setup.py
contains
Copy code
from setuptools import setup
setup(
    package_dir={"umbrella.apps.app1": "src"}
)
which allows us to
pip install apps/app1
independently and then
import umbrella.apps.app1
. Is this kind of namespace prefixing supported with source roots in Pants? pantsbuild/pants