[Distutils] Bug? zimpimporter putting in a misleading co_filename?
zooko
zooko at zooko.com
Tue Dec 23 15:14:25 CET 2008
On Dec 22, 2008, at 20:51 PM, Rocky Bernstein wrote:
> I recently cut over to using distutils to distribute open-source
> software. distutils decided to create an zipimporter egg. (Well,
> I'm sure it did what it did for good reason, I just am not all that
> aware of what I did to cause it too choose that.) When I inspect
> functions in that egg they seem to have a path that doesn't really
> exist. Is there something I did to create this improperly or
> perhaps this just they things are?
This is one of the parts of issue33:
http://bugs.python.org/setuptools/issue33
I just added the following comment to that issue ticket:
Suggested workaround for people finding this ticket from a search
engine query
such as "distutils zip problem":
1. Put the following in your distutils config file:
{{{
[easy_install]
zip_ok=False
}}}
Then all packages that you easy_install will be unzipped.
2. When creating a package for others, pass {{{zip_ok=False}}} to
{{{setup()}}}. This is a bit nasty, because that flag is really
supposed to
indicate whether there is something in the package that can't work
from zip, and
if you set that flag then this abrogrates the user's preference when
installing
-- there is no way for them to tell easy_install to install the
package zipped
in spite of the {{{zip_ok=False}}} flag. However, I have seen so
many reports
of problems with zip files, and zero reports of problems with
unzipped files,
and zero requests for zipped files, so I'm personally comfortable
setting
{{{zip_ok=False}}} just to help the user avoid the problems.
More information about the Distutils-SIG
mailing list