[Distutils] setuptools: .egg-info/ and PKG-INFO

Phillip J. Eby pje at telecommunity.com
Fri Nov 4 21:15:43 CET 2005


At 01:09 PM 11/4/2005 -0600, Ian Bicking wrote:

>Well, like I said, any custom command.  These just inherit from 
>setuptools.Command, implementing the standard 
>initialize_options/finalize_options/run methods.  I even tried having my 
>custom command recursively call "egg_info" (with get_finalized_command), 
>but because the error is signaled before I get as far as .run() (where I 
>put the egg_info call) it doesn't help.  Maybe I could use another method 
>that is invoked earlier.
>
>Though now I can't reproduce it; maybe this was fixed in 0.6a7?

Dunno.  As I mentioned on the Turbogears list, the problem isn't going to 
happen if your source code is in a subdirectory of the one containing 
setup.py.  Perhaps you've changed layouts?

In any case, as I mentioned on the Turbogears list, I'm going to try to put 
in some code to detect whether there is a "broken egg" in the working set 
and monkeypatch its 'version' attribute to work around this bootstrapping 
problem.  That should make it more robust and eliminate the need to include 
any of the .egg-info files in Subversion, at least for most normal 
projects.  (Setuptools is an oddity in that it defines entry points that it 
then uses while building itself!  Its .egg-info/entry_points.txt file is 
therefore not optional.  But the need for this sort of self-bootstrapping 
setup process should be extremely rare.)



More information about the Distutils-SIG mailing list