Commit f6227dd5 authored by Ian Lynagh's avatar Ian Lynagh
Browse files

Refuse to use threads unless python version >= 2.5.2

According to trac #1558, 2.5.2 should work. It's possible a lower bound,
e.g. 2.5, would suffice.
parent e8d20509
...@@ -10,6 +10,7 @@ import sys ...@@ -10,6 +10,7 @@ import sys
import os import os
import string import string
import getopt import getopt
import platform
import time import time
from testutil import * from testutil import *
...@@ -79,7 +80,17 @@ for opt,arg in opts: ...@@ -79,7 +80,17 @@ for opt,arg in opts:
config.compile_ways = filter(neq(arg), config.compile_ways) config.compile_ways = filter(neq(arg), config.compile_ways)
if opt == '--threads': if opt == '--threads':
config.threads = int(arg) # Trac #1558 says threads don't work in python 2.4.4, but do
# in 2.5.2. Probably >= 2.5 is sufficient, but let's be
# conservative here.
(maj, min, pat) = platform.python_version_tuple()
maj = int(maj)
min = int(min)
pat = int(pat)
if (maj, min, pat) >= (2, 5, 2):
config.threads = int(arg)
else:
print "Warning: Ignoring request to use threads as python version < 2.5.2"
# This has to come after arg parsing as the args can change the compiler # This has to come after arg parsing as the args can change the compiler
get_compiler_info() get_compiler_info()
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment