dev-cafe / autocmake

CMake plugin composer.
http://autocmake.org
BSD 3-Clause "New" or "Revised" License
42 stars 18 forks source link

better Python version verification in update.py #39

Closed miroi closed 9 years ago

miroi commented 9 years ago

This is associated with 'older' Python versions which are sometimes default part of Linux installations.

For example, on out IBM Linux cluster we have this problem:

ilias@147.213.242.7:~/work/qch/software/autocmake_development/autocmake/test/fc/cmake/.update.py                    
Traceback (most recent call last):
  File "./update.py", line 5, in <module>
    from collections import OrderedDict, namedtuple
ImportError: cannot import name OrderedDict
ilias@147.213.242.7:~/work/qch/software/autocmake_development/autocmake/test/fc/cmake/.python -V 
Python 2.6.8
ilias@147.213.242.7:~/work/qch/software/autocmake_development/autocmake/test/fc/cmake/.

Could be fix for 2.6.8 Python ?

bast commented 9 years ago

We need the OrderedDict. We could of course backport it. I agree that we need to clearly state the dependency on Python >= 2.7. I will take care of that. I don't think we need to introduce tweaks for lower versions of Python since the OrderedDict is only used by the CMake infrastructure maintainer, not by the end-user of the code.

bast commented 9 years ago

Now documented: http://autocmake.readthedocs.org/en/latest/general/requirements.html Closing.