frescobaldi / python-poppler-qt4

Python binding to poppler-qt4
Other
28 stars 13 forks source link

the fix for Python 3 breaks Python 2.6 #1

Closed dliessi closed 10 years ago

dliessi commented 10 years ago
Traceback (most recent call last):
  File "setup.py", line 118, in <module>
    pkg_config('poppler-qt4', ext_args)
  File "setup.py", line 86, in pkg_config
    if sys.version_info.major > 2:
AttributeError: 'tuple' object has no attribute 'major'

sys.version_info changed between 2.6 and 2.7, see http://docs.python.org/2.6/library/sys.html#sys.version_info (2.6) and http://docs.python.org/2/library/sys.html#sys.version_info (2.7).

You should use sys.version_info[0] instead of sys.version_info.major in setup.py lines 86 and 102.