I am having an issue with python namespaced packages and am wondering what is a good solution.
My project structure is similar to the following
project_name/ext/app_ext
That is the project I'm working on. It has dependencies that are also in the same namespace.
project_name/ext/base_ext
project_name/ext/other_dependency
I am working on the "app_ext" namespaced package in a django application. However, I am running into issues receiving a no module named app_ext
.
I think it has to do with how the dependency namespaced packages are installed (I'm installing with PIP). The dependency namespaced packages aren't installed with the __init__.py
files as is documented in the distribute / setuptools documentation, but all truly contain the following declarations in their installation packages.
from pkgutil import extend_path
__path__ = extend_path(__path__, __name__)
Now to the real question. Is there a trick to working with a namespaced package when there is already some related namespaced packages installed?