[Distutils] Dependencies conditional on specific installed versions of other dependencies?

Alexander Hill alex at hill.net.au
Wed Jan 21 07:13:16 CET 2015


Hi all,

I have run into a bit of a head-scratcher.

Prior to the upcoming version 1.8, Django included a comments app at
django.contrib.comments. As of 1.8, the app has been broken out into an
independent package, django-contrib-comments [1]. django-contrib-comments
requires Django >= 1.5.

The project I'm working on (Mezzanine) requires Django comments. I want
Mezzanine to support Django 1.4 through to 1.8, so I need
django-contrib-comments. But because it requires Django >= 1.5, when it's
in my dependencies Django gets automatically upgraded if version 1.4 is
installed, so the Mezzanine test suite isn't actually run under 1.4 [2].

Is there some way to only depend on django-contrib-comments if a minimum
version of Django is installed? Or any other way around this problem? Any
advice greatly appreciated!

Cheers,
Alex

[1] https://github.com/django/django-contrib-comments
[2] https://travis-ci.org/stephenmcd/mezzanine/jobs/47675518#L315
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/distutils-sig/attachments/20150121/93790c5a/attachment.html>


More information about the Distutils-SIG mailing list