[Python-Dev] Another approach for the import mechanism
Martin v. Löwis
martin@v.loewis.de
06 Dec 2002 07:28:12 +0100
Gustavo Niemeyer <niemeyer@conectiva.com> writes:
> That would kill the __init__.py that could be inside package.zip,
> right? One could leave package.zip's __init__.py outside it, and
> hack it as shown above, but it'd be great if this scheme was just
> an option for setup.py (--compress-packages). Otherwise the scheme
> must be prepared by the developer, not by the packager.
You can easily put an entire package into a .zip file, as the
packager: Just provide a .zip file with the entire package contents
(and file names starting with the package dir inside the zip file);
then provide a .pth file to add the zipfile to sys.path.
Regards,
Martin