[PEAK] Question about eggs

Phillip J. Eby pje at telecommunity.com
Tue Aug 29 19:26:53 EDT 2006


At 05:21 PM 8/29/2006 -0400, Matt Feifarek wrote:
>I've recently started using some python libraries that use eggs (Pylons, 
>Paste, WSGI, etc.) They and setuptools seem like an elegant solution. Kudos.
>
>I'm having trouble with the libraries installed via egg, and I have 
>stumped the Pylons list and the WingIDE list. I seem to have run up 
>against a problem with the 'trick' that easy_setup does to sys.path:

Have you tried using --always-unzip to ensure the eggs are installed 
unzipped?  Or is the problem simply that WingIDE is failing to read .pth files?


>My IDE has features to inspect python source code, which is a great boon 
>when learning to use new libraries. Unfortunately, WingIDE can't handle 
>egg files/directories for this feature.

Perhaps you should submit a bug report to its makers, then, as there is 
nothing being done by easy_install that isn't done for other non-egg 
packages like Numeric.  An IDE that doesn't support .pth files is failing 
to support normal Python behavior.  Uncommon behavior, perhaps, but it 
wasn't invented for setuptools and has existed in Python for quite a few years.

If lack of .pth file support is the source of the problem, then you should 
presumably be able to manually configure your WingIDE path to match the 
contents of your easy-install.pth file.

If it's merely a lack of .egg *file* support, then --always-unzip (-Z) 
should solve your problem.


>SO, I'd like to plain-old "install" these libraries on sys.path, but doing 
>so seems to confound the dependency checking parts of easy_install, and it 
>goes and installs these libraries again. It also seems to confound 
>paste/paster, which is probably using the require() syntax, and failing to 
>find version metadata without the egg metadata.
>
>Ian Bicking suggested using this flag:
>     easy_install --single-version-externally
>-managed
>But I see that it no longer exists in easy_install.

Ian is mistaken; it never existed in easy_install.  That option is only 
available when installing a setuptools-based package from its source code, 
via "setup.py install --single-version-externally-managed".


>I've pored over the docs and tried various switches to the easy_install 
>command, but can't figure it out. I can't install these libraries in 
>"development mode" as they do not come with setup.py modules. Can I simply 
>symlink the actual library directory (within the egg directory) to 
>sys.path without wrecking my python installation?

I'm not sure what you mean by this.  Use --always-unzip (-Z) to ensure you 
get unpacked egg directories.  Then, if Wing isn't picking up the contents 
of .pth files when it builds its sys.path, report it as a bug to the Wing 
IDE developers and manually configure your Wing path to include the eggs it 
doesn't automatically pick up.




More information about the PEAK mailing list