[Distutils] install_recommends proposal

Phillip J. Eby pje at telecommunity.com
Tue Oct 9 00:24:49 CEST 2007


At 02:45 PM 10/8/2007 -0500, Ian Bicking wrote:
>Marius Gedminas wrote:
> > On Wed, Sep 26, 2007 at 10:38:49PM +0200, Martijn Faassen wrote:
> >> I understand how the name "install_recommends" could be confusing
> >> terminology
> >
> > Yes it is
> >
> >> given the way package managers use the term 'recommended
> >> packages', which means extra that you could install too to get more
> >> features. "install_prefers" instead?
> >>
> >> An alternative would be to expand the syntax of install_requires and
> >> extra_require to allow the recommended version number hint. Something
> >> like this:
> >>
> >> install_requires = [
> >>     'foo (1.2.1)',
> >>     'bar >= 1.3 (1.3.2)',
> >>    ]
> >
> > A really human-readable version would be:
> >
> >   install_requires = [
> >       'foo (prefer 1.2.1)',
> >       'bar >= 1.3 (prefer 1.3.2)',
> >      ]
>
>This is kind of an old thread, but I personally would really like
>install_recommends.  One use case is to recommend packages that are not
>strictly required.  E.g., I have WSGI applications that work well with
>PasteScript for serving the application, but PasteScript isn't actually
>required.  This leads to an awkward situation where I have to choose
>whether to require a package that isn't actually needed (e.g., it's
>never imported anywhere), or leave it out and confuse people who install
>the application.  If preferred versions were part of install_requires, I
>don't see how I could achieve this.

That's what 'extras_require' is for; you can always have an extra 
named 'recommended', and then install 'Foo[recommended]' to get all 
the recommended stuff.

This is a very different use case than the original request of this 
thread (which is really just preferred packages/versions within 
requirement specs).



More information about the Distutils-SIG mailing list