I have a small python package that needs to use OrderedDict. As of python 2.7, OrderedDict is included in python collections. For python 2.6 and before, there is the ordereddict package that offers OrderedDict. How can I ask for ordereddict to be installed in setup.py for only python 2.6 and earlier?
-
first check package is in system or not using dir('OrderedDict')Saket Mittal– Saket Mittal2015-08-30 12:18:12 +00:00Commented Aug 30, 2015 at 12:18
-
2possible duplicate of What is the best way to handle dependencies based on the Python version?seartun– seartun2015-08-30 12:27:29 +00:00Commented Aug 30, 2015 at 12:27
-
@seartun is correct. My question has been asked and answered.seandavi– seandavi2015-08-30 13:19:47 +00:00Commented Aug 30, 2015 at 13:19
Add a comment
|