[Distutils] entry point for new installations?

Kevin Dangoor dangoor at gmail.com
Mon Mar 20 23:26:14 CET 2006


On 3/20/06, Phillip J. Eby <pje at telecommunity.com> wrote:
> An entry point won't really help you much here, because it would have to
> know how to perform this notification.  Presumably, it would either have to
> talk to a socket or modify a file somewhere.

The egg that has that entry point would have to know how to find its
configuration file to know what to notify, yes. It's not entirely
pleasant, but it's still doable.

> However, if you're going to have to monitor for file changes anyway, then
> you might as well just monitor sys.path directories for new .egg files, or
> monitor changes to easy-install.pth files.

My thought was that no file monitoring would be required. easy_install
would keep track of the eggs it installed and then pass that list
along to everything that defines that entry point.

> The only other thing I can think of that would work is if you had server
> processes write their process IDs some place, and then the hypothetical
> entry point could send them SIGHUPs or something.  But monitoring
> file/directory changes is a bit more cross-platform, doesn't require adding
> any entry point code, is probably part of existing reload code, and doesn't
> require a pidfile arena, with all the associated permissions and cleanup
> headaches thereof.

The entry point is probably a premature optimization. File
modification time lookups are pretty cheap. And, if it's only watching
easy-install.pth, that would be dirt cheap.

Kevin


More information about the Distutils-SIG mailing list