[Distutils] egg-info & develop

PJ Eby pje at telecommunity.com
Sun Apr 15 19:30:17 CEST 2012

On Fri, Apr 13, 2012 at 5:50 AM, Andrea Crotti <andrea.crotti.0 at gmail.com>wrote:

> I'm trying to understand exactly when running python setup.py develop is
> necessary to make sure that everything will work as expected.
> After some thinking I came to the conclusion that all the information
> that should be kept up-to-date is in the .egg-info directory. So if I
> understood correctly means that I only need to run "develop" once and
> "egg_info" every time I need to update.

Not quite correct: if you add new scripts to your project, then you would
also need to run develop in that case, to install the new scripts.

And as a related topic we would really like to avoid cluttering the
> directories with these egg-info directories, and with my script I know
> write them in another known directory.
> But what happens if pkg_resources or similar try to use these
> information and don't find the egg-info because it's not where it's
> supposed to be?

It will either fail to find the package, or add some other directory to
sys.path, possibly messing various things up in the process.  Using
"develop" with a relocated egg-info directory should actually give you an
error message; I'm kind of surprised that it's not giving you an error
message, unless perhaps you're waiting until *after* you've run "develop"
to move the .egg-info.  (Either that or I didn't consider that anybody
would want to use develop with a manually-relocated .egg-info, and thus
didn't put in the error checking.)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/distutils-sig/attachments/20120415/2ba3a07d/attachment.html>

More information about the Distutils-SIG mailing list