[Distutils] tracking requested vs dependency installs in PEP 376 metadata
menesis at pov.lt
Thu Oct 8 21:00:44 CEST 2009
2009/10/8 Carl Meyer <carl at meyerloewen.net>:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> Hey all,
> I propose adding a bit to the PEP 376 metadata that indicates whether a
> package was installed by user request or as a dependency of another
> package. This would allow (un)installer tools to intelligently remove
> orphaned dependencies, if they so choose. There might be questions about
> the details of such an uninstaller feature, but I'm not intending to
> discuss that here. The metadata itself is simple enough to track, and
> seems like it ought to be included for its future usefulness.
> 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.
Debian's Apt has this capability, see
https://wiki.ubuntu.com/PackageDependencyManagement . It keeps a
separate file to track the manually installed packages, and the flag
is named "Auto-Installed". REQUIRED is an ambiguous name -- is it
required by other packages, or wanted by user for any reason (and that
is the case)?
> For the API, I propose adding a "required" property to the Distribution
> class, which would be True or False based on the presence or absence of
> the REQUIRED file.
> I've added a demo implementation to a fork of Tarek's pep376 repo on
> bitbucket: http://bitbucket.org/carljm/pep376/changeset/0c8002e65cb7/
More information about the Distutils-SIG