[Distutils] tracking requested vs dependency installs in PEP 376 metadata
ianb at colorstudy.com
Thu Oct 8 20:50:45 CEST 2009
On Thu, Oct 8, 2009 at 11:39 AM, Carl Meyer <carl at meyerloewen.net> wrote:
> I propose adding a metadata file REQUIRED within the .egg-info
> directory. The presence of this file indicates that the user
> specifically required this distribution. The absence of the file
> indicates that the distribution was installed as a dependency. The
> contents of the file are not used.
I can imagine adding a little information, basically a log of when and why
and who installed the package. For instance:
agent: pip 0.5
Potentially a package could have multiple records, because multiple
installers may in some sense touch a package (e.g., if you install
YetAnotherPackage that requires the same library as OtherPackage). You
could use INI-style and maybe label each record with the date, like
This information seems fairly easy to generate. Updating it after
installation would be nice, but also means already-installed packages can be
written to, which is not as nice IMHO. Being unable to write to this file
should be a non-fatal error for an installer.
Either way, a package could become REQUIRED (or user-requested) at any time
after it is installed. E.g.:
easy_install ElementTree # which is required by MarkDown
Now ElementTree should not be considered orphaned if MarkDown is removed.
Ian Bicking | http://blog.ianbicking.org |
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Distutils-SIG