[Distutils] PEP 345, PEP 376, PEP 386
ronaldoussoren at mac.com
Sun Jun 7 16:36:16 CEST 2009
On 4 Jun, 2009, at 5:54, Tarek Ziadé wrote:
>> I'd say that it's distutils' responsibility not to offer to uninstall
>> anything it didn't install.
>> Yep. Though I think that nowdays dpkg installs to a different
>> directory than
>> Distutils' default. So users have to specify extra options to break
>> their systems.
> But how does those third-party install the projects ?
> Don't they use Distutils' install command under the hood ?
> If so, the new PEP 376 APIs are ignoring previous versions of
> egg-infos and work only with the ones that complies with the new
> standard (it's a quick control right now, look at the "is_egg_info"
> API in http://bitbucket.org/tarek/pep376/src/tip/pkgutil.py)
> So, in any case the uninstall command will not work with project that
> are filtered out by is_egg_info().
> So maybe we could add a "INSTALLER" file with a unique md5 key
> provided by the project that installed the package,
> and ask for the key when calling this API ? If not provided, it would
> use Distutils's md5 key
Why should the the INSTALLER file contain a md5 value? I'd use either
the name of the packager (dpkg,rpm,...), or even that plus the name of
the external package:
This would make it possible for a PEP376-based uninstaller to give
more meaningful error messages when you try to uninstall a project
that was installed by a system package. That is, it could say "this
project was installed using the 'py26-zlib' system-package, use 'rpm'
to uninstall" rather than "go away I didn't install this".
BTW. I'd say that the INSTALLER should default to "distutils", that
is: don't install the INSTALLER file unless someone explicitly asks
for it by specifying a different value for the installer. A tool like
bdist_rpm could of course automaticly set that different value.
> Distutils-SIG maillist - Distutils-SIG at python.org
More information about the Distutils-SIG