Re: [Python-Dev] PEP 365 (Adding the pkg_resources module)

At 08:34 PM 3/20/2008 +0000, Paul Moore wrote:
I then went on to say that putting dependency information in setup.exe and expecting users to use automatic dependency resolution encourages developers to omit dependency details from documentation (to an extent I can't quantify, but I believe is non-zero). That lack of documentation "forces" me to rely on the automatic process. THAT is the thing that removes my choice, not easy_install's ability to skip dependency checking.
Ah. Fair enough. So, if we get PyPI to display that information, that should fix this problem for you?
People are starting to omit distributing bdist_wininst installers in favour of eggs only.
You mean, they're shipping a .win32.egg, but not an .exe?
And you cannot (to my knowledge) convert an egg into a bdist_wininst installer,
Not at the moment, no. It seems like it ought to be *possible*, though, since the reverse translation can be done. Eggs are more restrictive in what they can include, so the reverse step actually ought to be relatively easy. Indeed, I would think that it could be done by a standalone tool without even using setuptools. All that really needs to happen (I believe) is that the zipfile directory needs all its names prepended with PURELIB or PLATLIB, and then add the appropriate prefix .exe and bdist_wininst extra data on the front of the restructured zip file. In fact, it should probably be possible to write such a tool by subclassing the distutils bdist_wininst command and overriding the run() and get_inidata() methods, using the existing create_exe() method to do that part of the magic. The other tool that would be handy to have, would be one that unpacks eggs into standard distutils-style installation.
Personally, I'm not very thrilled with the number of complaints on this thread that could be resolved by RTFMing. ... Honestly, I'm trying to help improve (by my measure of improvement, certainly) setuptools. I've done as much (more!) homework as I feel is appropriate (no, I haven't studied the whole manual all the way through). Being treated as if it's my fault, and I haven't done enough, is both discouraging and to be honest, somewhat offensive.
My comment wasn't aimed specifically at you; you're only one of many people today who have appeared to state that something or other wasn't possible or documented, described optional behavior as required, etc. Addressing each and every one point by point looks petty, but then lumping them together like that makes it look like I'm picking on you specifically. Sorry about that. In any event, I'm not saying that anyone hasn't done enough or that it's their fault. The fact that I'm not thrilled about some of the things said in the thread doesn't somehow magically invalidate other people's frustrations, nor was it my intent to accuse you (or anyone) of making up their problems. I'm just expressing *my* frustration.

Phillip J. Eby wrote:
The other tool that would be handy to have, would be one that unpacks eggs into standard distutils-style installation.
Hear, hear. I'm an author of a couple libraries that need to interoperate with others. Of the many eggs I've downloaded over the past year, I'd say 80%+ are never installed or even built--I just want to grep the source code, and using my preferred tools, not some lame Find command in a ZIP browser menu. Robert Brewer fumanchu@aminus.org

On Mar 20, 2008, at 6:22 PM, Robert Brewer wrote:
Phillip J. Eby wrote:
The other tool that would be handy to have, would be one that unpacks eggs into standard distutils-style installation.
Hear, hear. I'm an author of a couple libraries that need to interoperate with others. Of the many eggs I've downloaded over the past year, I'd say 80%+ are never installed or even built--I just want to grep the source code, and using my preferred tools, not some lame Find command in a ZIP browser menu.
Um, isn't this tool called "unzip"? I have done this -- accessed the source code -- many times, and unzip suffices. I don't know what else would be required in order to make an egg into "a standard distutils-style installation". Until PJE's comment above, I thought that unzip already accomplished exactly that. Regards, Zooko

At 09:53 AM 3/21/2008 -0600, zooko wrote:
Um, isn't this tool called "unzip"? I have done this -- accessed the source code -- many times, and unzip suffices.
I don't know what else would be required in order to make an egg into "a standard distutils-style installation".
You also have to rename the EGG-INFO directory to a .egg-info file of the same basename as the original .egg; otherwise, pkg_resources and other runtime access to the egg won't know it's installed.

zooko:
Um, isn't this tool called "unzip"? I have done this -- accessed the source code -- many times, and unzip suffices.
The type of issue I ran into with eggs is when you get an exception with a trace that includes an egg, you can't use the normal means to look at the code. Instead you have to understand that its an egg, unzip the code, manually translate the path, open the file and go to the line number. Similarly, you can't easily grep the code in its egg state. If there was a global flag where I could say 'install eggs as directories of source' then I'd be much happier. Just reread the EasyInstall documentation and '--always-unzip' is portrayed as a 'don't do this' option. As it is I just avoid eggs. They may make sense for installing applications but for development they get in the way. Neil
participants (4)
-
Neil Hodgson
-
Phillip J. Eby
-
Robert Brewer
-
zooko