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

Nick Coghlan ncoghlan at gmail.com
Mon Jul 22 13:22:53 CEST 2013

On 22 Jul 2013 19:12, "Vinay Sajip" <vinay_sajip at yahoo.co.uk> wrote:
> Nick Coghlan <ncoghlan <at> gmail.com> writes:
> > On 22 Jul 2013 01:46, "PJ Eby" <pje <at> telecommunity.com> wrote:
> > > To put it another way, it's not "exported only if extra is available",
> > > it's "exported, but make sure you have this first."  A subtle
> > > difference, but important to the original use cases (see below).
> > Ah, yes, I see the distinction (and it does make this notion
> simpler).
> Does "make sure you have this first" mean "install this if it's not
> or "raise an exception if it's not present"? AFAICT PEP 376 does not
> consider extras at all, and so does not have any standard way to store
> extras a distribution was installed with. So what's the standard way of
> testing if "extra is available"?

Check if all the dependencies associated with that extra are present. That
was my observation earlier: since extras aren't really a thing in their own
right (they're just a shorthand for referring to an additional set of
dependencies) allowing script wrapper generation to depend on an extra is
likely a bad idea, since it may lead to a partially installed package.

Since the check in pkg_resources is callback based, it's really up to the
application looking for entry points to decide what unmet dependencies mean.


> Regards,
> Vinay Sajip
> _______________________________________________
> Distutils-SIG maillist  -  Distutils-SIG at python.org
> http://mail.python.org/mailman/listinfo/distutils-sig
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/distutils-sig/attachments/20130722/69aa2152/attachment.html>

More information about the Distutils-SIG mailing list