module-packaging

The way to make namespace packages in Python

主宰稳场 提交于 2019-12-20 10:33:55
问题 From Namespace Packages in distribute, I know I can make use of namespace packages to separate a big Python package into several smaller ones. It is really awesome. The document also mentions: Note, by the way, that your project’s source tree must include the namespace packages’ __init__.py files (and the __init__.py of any parent packages), in a normal Python package layout. These __init__ .py files must contain the line: __import__('pkg_resources').declare_namespace(__name__) This code