This isn't a reliable check - it's quite normal for setuptools to install zip files with the .egg extension. But it can also install directories with a .egg extension, so you can't tell by filename.

I think the answer is to iterate through path  in `__init__`, checking [is_zipfile](https://docs.python.org/2/library/zipfile.html#zipfile.is_zipfile) for each entry, and store a list of zip paths. Then you can test if `any(modinfo[1].startswith(p) for p in self.zip_paths)`.