working with different requirements depending on python version
Hi All, While trying to debug another problem, I re-ran some Jenkins jobs for two of my packages, which promptly failed under Python 2.5: http://jenkins.simplistix.co.uk/job/testfixtures-buildout/ http://jenkins.simplistix.co.uk/job/checker-buildout/ Now, the issue here is that zope.interface 4.0 and above no longer supports Python 2.5: http://jenkins.simplistix.co.uk/job/checker-buildout/PYTHON=2.5,label=linux/... http://pypi.python.org/pypi/zope.interface/4.0.0 That's fine, but I'd like the above projects to continue 2.5 support for the time being. The simple solution would be to add a versions section to the buildout here: https://github.com/Simplistix/checker/blob/master/buildout.cfg ...and pin the versions in the tox.ini here: https://github.com/Simplistix/checker/blob/master/tox.ini ...however, that doesn't give the correct result. The version requirement is "use the latest version of all packages that work with the Python version under test" and the changes I've suggested would mean that on Python 2.6 and 2.7, the latest version of zope.interface wouldn't be used. What makes this even more "interesting" is that zope.interface isn't a direct requirement of either of these projects, it's a dependency of a dependency in both cases. How have other people solved this? Chris -- Simplistix - Content Management, Batch Processing & Python Consulting - http://www.simplistix.co.uk
On Sat, Jun 30, 2012 at 5:54 AM, Chris Withers <chris@simplistix.co.uk> wrote:
The version requirement is "use the latest version of all packages that work with the Python version under test" and the changes I've suggested would mean that on Python 2.6 and 2.7, the latest version of zope.interface wouldn't be used.
What makes this even more "interesting" is that zope.interface isn't a direct requirement of either of these projects, it's a dependency of a dependency in both cases.
How have other people solved this?
This might not be applicable because I haven't used Jenkins or buildout (but I do use tox). In cases where I've had different requirements for different Python versions, I've done the determination in setup.py. There I determined the 'install_requires' argument to setup() differently depending on the Python version. --Chris
participants (2)
-
Chris Jerdonek
-
Chris Withers