One option would be to let python-ordereddict
depend on python2.6
, then let your main package depend on python2.7 | python-ordereddict
. I'm assuming it doesn't make sense to install python-ordereddict
with 2.7, since OrderedDict
is available in that release.
Of course, that's ugly because it pushes the dependency of the main package into the library. The alternative is to realize that dependencies must be propositional formulas in conjunctive normal form (CNF). By applying the distributive law of propositional logic, you can convert
python2.7 | (python2.6, python-ordereddict)
to the equivalent CNF
python2.7 | python2.6, python2.7 | python-ordereddict
(which, I admit, isn't particularly pretty either).