[Distutils] Why I like eggs (or similar mechanisms) and my thoughts on future of buildout

Jim Fulton jim at jimfulton.info
Sun Aug 21 12:16:42 EDT 2016


On Sat, Aug 20, 2016 at 11:07 PM, Nick Coghlan <ncoghlan at gmail.com> wrote:

> On 21 August 2016 at 05:46, Jim Fulton <jim at jimfulton.info> wrote:
> > On Sat, Aug 20, 2016 at 3:02 PM, Nick Coghlan <ncoghlan at gmail.com>
> wrote:
> >> > I have the impression that uninstalling things can be
> >> > problematic, but maybe that's been fixed.
> >>
> >> Uninstallation is fine, as we *do* have a full file manifest after a
> >> component has been installed.
> >
> > So, if package A and B install the same file, X, and then A is
> uninstalled,
> > is X still there?  If then B is uninstalled, does X go away?  Does this
> > machinery depend on whether X has the the same contents in A and B?
>
> If A and B install to the same path, B will overwrite A's version, and
> if either is uninstalled, they'll delete whichever version is
> currently there. Since "the same path" in this case usually refers to
> either a script or a Python module, the unhandled conflict is really
> at install time - we'd want something closer to the RPM/deb style "A
> file already exists at that destination, so we're not installing the
> requested package at all", rather than a Windows-style reference
> counting system.
>
> As Daniel notes, this kind of check is actually already possible when
> installing from a wheel file today, it just requires someone with the
> roundtuits to add it to pip (perhaps via a new vendorable package for
> working with Python installation metadata and detecting conflicts
> between what's already installed and a wheel being considered for
> installation).
>

The most common source of conflicts, I expect, are namespace package
__init__.py files. You wouldn't want to reject installing a package with a
conflicting __init__.py file in a namespace package.  I realize that PEP420
and the demise of Python 2 should make this case go away, someday, although
PEP420 doesn't prohibit __init__.py files in namespace packages.

OK, I'm done beating this horse. It was dead a while ago. :)

Jim

-- 
Jim Fulton
http://jimfulton.info
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/distutils-sig/attachments/20160821/dee67be3/attachment.html>


More information about the Distutils-SIG mailing list