pep 420 namespace_packages purpose in setup.py
问题 What is the purpose of the namespace_packages argument in setup.py when working with PEP420 namespace packages (the ones without __init__.py)? I played with it and saw no difference whether I declared the namespace packages or not. "setup.py install" and "pip install ." worked in any case. I am building an automatic setup.py code generator and would be happy not to handle this if this is not necessary. 回答1: As long as you: aim for Python 3.3 and newer or Python 2.7 with importlib2 dependency