[Distutils] tracking requested vs dependency installs in PEP 376 metadata

Carl Meyer carl at meyerloewen.net
Thu Oct 8 21:33:15 CEST 2009

Hash: SHA1

Ian Bicking wrote:
> 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
>   install-date: 2009-10-08T13:44:00UTC
>   installed-for-user: False
>   installed-for-package: OtherPackage==0.3 
> 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
> [2009-10-08T13:44:00UTC].

Sure; I considered this possibility too, but wanted to keep the initial
proposal to "the simplest thing that could possibly work." I have no
problem with a log-style approach that includes more information, and if
it makes sense to others I can work on the implementation.

> 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.

Agreed. In my simple proposal, the only time an already-installed
package would need to be touched again is if you're
explicitly-installing an already-installed dependency (as in your
example below). In that case the REQUIRED file would be added, but in
that case touching the installation should be both possible and
uncontroversial, since you're specifically asking "again" to install it.

> Either way, a package could become REQUIRED (or user-requested) at any
> time after it is installed.  E.g.:
>   easy_install Markdown
>   easy_install ElementTree # which is required by MarkDown
> Now ElementTree should not be considered orphaned if MarkDown is removed.


Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/


More information about the Distutils-SIG mailing list