Opened 2 years ago

Closed 2 years ago

Last modified 2 years ago

#3493 closed defect (fixed)

Compilation error with python 2.6

Reported by: vesnikos Owned by: grass-dev@…
Priority: normal Milestone: 7.4.1
Component: Compiling Version: svn-trunk
Keywords: python Cc:
CPU: Unspecified Platform: Linux

Description

Tried to compile the latest grass from source, I got this error:

Traceback (most recent call last):

File "/home/nv1g17/grass/dist.x86_64-pc-linux-gnu/tools/mkhtml.py", line 38, in <module>

if sys.version_info.major == 2:

AttributeError?: 'tuple' object has no attribute 'major' make[4]: * home/xxxxx/grass/dist.x86_64-pc-linux-gnu/docs/html/pngdriver.html Error 1

my python:

Python 2.6.6 (r266:84292, May 1 2012, 13:52:17) [GCC 4.4.6 20110731 (Red Hat 4.4.6-3)] on linux2

Change History (4)

comment:1 Changed 2 years ago by mmetz

Resolution: fixed
Status: newclosed

In 72236:

restore compatibility with python2.6- (fixes #3493)

comment:2 Changed 2 years ago by neteler

Keywords: python added
Milestone: 7.4.1
Resolution: fixed
Status: closedreopened

Re-opened for backport

comment:3 in reply to:  2 Changed 2 years ago by mmetz

Resolution: fixed
Status: reopenedclosed

Replying to neteler:

Re-opened for backport

New in trunk, does not apply to 7.4-, thus fixed.

comment:4 Changed 2 years ago by wenzeslaus

Note that sys.version_info.major is at more places. sys.version_info[0] works all right in 3, but in general I'm not sure if we can maintain 2.6 compatibility while using 3 (https://docs.python.org/3/howto/pyporting.html#drop-support-for-python-2-6-and-older).

Note: See TracTickets for help on using tickets.