[Distutils] Q about best practices now (or near future)

Daniel Holth dholth at gmail.com
Mon Jul 22 14:31:35 CEST 2013


On Mon, Jul 22, 2013 at 7:29 AM, Paul Moore <p.f.moore at gmail.com> wrote:
> On 22 July 2013 12:22, Nick Coghlan <ncoghlan at gmail.com> wrote:
>>
>> since extras aren't really a thing in their own right (they're just a
>> shorthand for referring to an additional set of dependencies)
>
>
> I'm still trying to be clear in my mind about what extras are, and how they
> should work. From this description, it occurs to me to ask, what is the
> difference between an extra and a (metadata only, empty) second distribution
> that depends on the base project as well as the "additional set of
> dependencies"? Is it just the admin overhead of registering a second
> project?
>
> Looking at extras this way gives a possible way of generating scripts only
> when the extras are present - just add the scripts to the dummy "extra"
> distribution.

Yes, extras are *only* a way to create aliases for a set of
dependencies. They are not recorded as installed. It should make no
difference whether you install ipython[notebook], look up the
dependencies for the ipython notebook and install them manually, or
happen to have the ipython[notebook] dependencies installed and then
later install ipython itself.

What you get is a convenient way to install a distribution's optional
dependencies without having to worry about whether the feature's
dependencies change.

It is a bad idea to make it too easy to install broken versions of
distributions having missing scripts.


More information about the Distutils-SIG mailing list