[Distutils] install_recommends proposal

Martijn Faassen faassen at startifact.com
Thu Sep 27 13:48:33 CEST 2007

Martijn Faassen wrote:
> My first response, not based on actually looking at the proposal is that 
> a simple 'or' condition would not be sufficient, as the package manager 
> doesnt' know which clause in the condition to look at to find the 
> preferred version. My second response upon pondering a bit more is that 
> the package manager could be told to always prefer the or-ed condition 
> that is most specific.

This assumes of course that setuptools has a way to let installation tools:

* access the or clauses

* determine which ones are the most specific

Or has a resolution algorithm for this itself.

We also have to resolve situations where we could have multiple specific 

Package A says (hypothetical syntax):

    install_requires = [
       'B or B == 1.3',
       'C or C == 1.7',

and then a package B which says:

     install_requires = [
        'C or C == 1.7.1',

which one to pick? C will do, but if we want to be specific, should we 
pick C 1.7 or C 1.7.1?

I propose we let the outer package (A) break the contention and thus 
decide on C 1.7. The inner package winning would otherwise block 
framework packages from having the ability to make informed decisions to 
diverge from recommendations lower down the dependency tree.



More information about the Distutils-SIG mailing list