[Distutils] The "incompatible versions" problem

Chris Withers chris at simplistix.co.uk
Sat Nov 28 23:45:33 CET 2009


Lennart Regebro wrote:
>> Whereby, setuptools would raise an exception if the following packages were
>> installed:
>>
>> def setup(
>>  ...
>>  install_requires=['zope.component']
>>  )
> 
> I think this is the problem. I understand what you mean, but it's not
> obvious to me at all that this should raise an error in this
> situation.

...I'm not even suggesting it should ;-) I was just presenting the 
problem, and typing a possibility as I was writing.

> But yet, for your suggestion to work, it has to.

Well, per library. The sketch I put down allowed zope.component 4.0 to 
complain if a library requests zope.component, didn't specify 4.0 and 
newer, but yet 4.0+ ended up installed.

> In
> practice, that means that you, to use zope.component >= 4.0, must give
> a version number. But even when an API changes, it may be possible to
> support both versions. And that would then be impossible to do in this
> case.

Well, that's why I put the hint in zope.component's setup function call 
in the example... It would only be used for incompatible API versions, 
otherwise it could be left out, and any newer version would be fine...

Chris



More information about the Distutils-SIG mailing list