diff options
Diffstat (limited to 'src/engine/SCons/compat/__init__.py')
-rw-r--r-- | src/engine/SCons/compat/__init__.py | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/engine/SCons/compat/__init__.py b/src/engine/SCons/compat/__init__.py index 959bf52..0dfb18e 100644 --- a/src/engine/SCons/compat/__init__.py +++ b/src/engine/SCons/compat/__init__.py @@ -98,6 +98,20 @@ except NameError: import sets __builtin__.set = sets.Set +# If we need the compatibility version of textwrap, it must be imported +# before optparse, which uses it. +try: + import textwrap +except ImportError: + # Pre-2.3 Python has no textwrap module. + import_as('_scons_textwrap', 'textwrap') + +try: + import optparse +except ImportError: + # Pre-2.3 Python has no optparse module. + import_as('_scons_optparse', 'optparse') + try: import subprocess except ImportError: |