In this comment I learned that Python has a limitation that PEP 420 namespace packages (packages without a init.py file) aren’t recognized by the zip importer. Although that issue might be addressed in Python, support for these packages will only be available in newer Pythons.
Investigating further, I found that the zipimporter will recognize a PEP 420 namespace package if the zip file includes directory entries (zero-length files named with a trailing
/), a convention that seems to be common among the most popular zip file implementations (including
python -m zipfile, Info-ZIP, and Windows Explorer).
Wheels, however, are constructed without directory entries - only including the files, so I filed pypa/wheel#287 to explore the possibility of the wheel format including these directory entries to bring compatibility to wheels that happen to be on sys.path, acknowledging that such use is discouraged.
At @pfmoore’s direction, I’ve begun work on amending the wheel spec to clarify that the presence of these directories are preferred.
Feel free to discuss, but note that the consequences of not accepting this change (or similar) might mean unraveling all of the aformentioned work and returning to the drawing board as far whether eggs should be enhanced and preferred for tools that need plugins.