Wireshark-dev: Re: [Wireshark-dev] [Wireshark-commits] rev 51158: /trunk/ /trunk/: configure.ac

From: Gerald Combs <gerald@xxxxxxxxxxxxx>
Date: Mon, 05 Aug 2013 13:26:16 -0700
On 8/5/13 12:13 PM, Guy Harris wrote:
> 
> On Aug 5, 2013, at 11:57 AM, gerald@xxxxxxxxxxxxx wrote:
> 
>> http://anonsvn.wireshark.org/viewvc/viewvc.cgi?view=rev&revision=51158
>>
>> User: gerald
>> Date: 2013/08/05 11:57 AM
>>
>> Log:
>> Don't force the use of Python 2.x, similar (but not identical to)
>> r51128. Print a warning if we're building with Python < 2.5.
> 
> ...or Python 3, given that the test is
> 
> 	if test "$python_major_version" -eq 2 -a "$python_minor_version" -ge 5
> 
> which returns true for Python 2.x, where x >= 5, but false for Python x.y, where x > 2 (or x < 2, but you *do* want to warn there).
> 
> Should it be
> 
> 	if test "$python_major_version" -eq 3 -o \( "$python_major_version" -eq 2 -a "$python_minor_version" -ge 5 \)
> 
> (as the man page says on my machine, "The -a operator has higher precedence than the -o operator", but I'd parenthesize it anyway)?  That'd fail on a future Python 4, but such a Python 4 might well require more changes to the Python scripts....

I switched it to

  if test "$python_major_version" -eq 2 -a "$python_minor_version" -lt 5

in r51161. According to the documentation 1.x doesn't have
sys.version_info so we'd have to find another way to check for
$python_major_version < 2 if the issue arose.