[Distutils] egg-info directory in source distribution of setuptools

Phillip J. Eby pje at telecommunity.com
Wed Feb 22 01:40:45 CET 2006


At 03:30 PM 2/21/2006 -0800, Eric Huss wrote:
>I noticed that there is an egg-info directory in the source directory (and
>there's one in the svn sandbox with just one file, entry_points.txt).  It
>seems like this is not necessary, since these files will be generated by
>setup.py.
>
>It's only a minor problem...we are mirroring the source repository
>locally, and when we run "setup.py install", it causes a modification of
>some of the files to show up (due to newline changes and some difference
>in file listings).
>
>Was including this directory intentional for something?

Yes.  :)

Specifically, setuptools' own setup is a bit unique; it depends on an 
existing entry_points.txt because generating entry_points.txt is something 
that's *done by an entry point*.  So, it only appears that the .egg-info 
directory can be generated from setup.py in this case.

This is just a bootstrapping issue, so it doesn't affect projects other 
than setuptools itself.

Actually, I just realized you're asking two questions, and I only answered 
one of them, which is why .egg-info/entry_points.txt is in Subversion.  The 
other question was, why is .egg-info in source distributions?

The answer to that, is that it's possible to have other files in .egg-info 
besides the ones defined by setuptools.  For example, SQLObject can store 
various configuration files there, and they aren't necessarily generated 
from a setup.py.  The other reason is that a SOURCES.txt file is put in 
there, to facilitate second-generation sdist building, which is needed by 
bdist_rpm and similar package-building tools.  Setuptools has shortcuts for 
building a source manifest when you build from SVN or CVS, but these 
shortcuts don't work with a source distribution tarball, so the tarball has 
to include egg-info/SOURCES.txt to allow you to build an sdist *from* an sdist.



More information about the Distutils-SIG mailing list