[Distutils] install_recommends proposal
Philipp von Weitershausen
philipp at weitershausen.de
Thu Sep 27 13:49:58 CEST 2007
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)',
> ]
Or make 'prefer' an actual version operator like == or >=:
install_requires = [
'foo prefer 1.2.1',
'bar >=1.3, prefer 1.3.2',
]
The advantage of including it into install_requires is that you avoid
redudancy by not having to repeat the list of required packages twice.
Another advantage might be that the information would be written to a
place that we already know (EGG-INFO/requires.txt) and have extraction
tools for. The only problem with that would be that eggs with a "modern"
EGG-INFO like that would not be installable on older setuptools versions
that know nothing about the 'prefer' operator. Then again, that would
also be the case with Martijn's proposed install_recommends parameter.
--
http://worldcookery.com -- Professional Zope documentation and training
More information about the Distutils-SIG
mailing list