<s> """<STR_LIT>""" <EOL> import codecs <EOL> import os <EOL> import re <EOL> import sys <EOL> from os . path import pardir , realpath <EOL> try : <EOL> import configparser <EOL> except ImportError : <EOL> import ConfigParser as configparser <EOL> __all__ = [ <EOL> '<STR_LIT>' , <EOL> '<STR_LIT>' , <EOL> '<STR_LIT>' , <EOL> '<STR_LIT>' , <EOL> '<STR_LIT>' , <EOL> '<STR_LIT>' , <EOL> '<STR_LIT>' , <EOL> '<STR_LIT>' , <EOL> '<STR_LIT>' , <EOL> '<STR_LIT>' , <EOL> '<STR_LIT>' , <EOL> ] <EOL> def _safe_realpath ( path ) : <EOL> try : <EOL> return realpath ( path ) <EOL> except OSError : <EOL> return path <EOL> if sys . executable : <EOL> _PROJECT_BASE = os . path . dirname ( _safe_realpath ( sys . executable ) ) <EOL> else : <EOL> _PROJECT_BASE = _safe_realpath ( os . getcwd ( ) ) <EOL> if os . name == "<STR_LIT>" and "<STR_LIT>" in _PROJECT_BASE [ - <NUM_LIT:8> : ] . lower ( ) : <EOL> _PROJECT_BASE = _safe_realpath ( os . path . join ( _PROJECT_BASE , pardir ) ) <EOL> if os . name == "<STR_LIT>" and "<STR_LIT>" in _PROJECT_BASE [ - <NUM_LIT:10> : ] . lower ( ) : <EOL> _PROJECT_BASE = _safe_realpath ( os . path . join ( _PROJECT_BASE , pardir , pardir ) ) <EOL> if os . name == "<STR_LIT>" and "<STR_LIT>" in _PROJECT_BASE [ - <NUM_LIT> : ] . lower ( ) : <EOL> _PROJECT_BASE = _safe_realpath ( os . path . join ( _PROJECT_BASE , pardir , pardir ) ) <EOL> def is_python_build ( ) : <EOL> for fn in ( "<STR_LIT>" , "<STR_LIT>" ) : <EOL> if os . path . isfile ( os . path . join ( _PROJECT_BASE , "<STR_LIT>" , fn ) ) : <EOL> return True <EOL> return False <EOL> _PYTHON_BUILD = is_python_build ( ) <EOL> _cfg_read = False <EOL> def _ensure_cfg_read ( ) : <EOL> global _cfg_read <EOL> if not _cfg_read : <EOL> from . . resources import finder <EOL> backport_package = __name__ . rsplit ( '<STR_LIT:.>' , <NUM_LIT:1> ) [ <NUM_LIT:0> ] <EOL> _finder = finder ( backport_package ) <EOL> _cfgfile = _finder . find ( '<STR_LIT>' ) <EOL> assert _cfgfile , '<STR_LIT>' <EOL> with _cfgfile . as_stream ( ) as s : <EOL> _SCHEMES . readfp ( s ) <EOL> if _PYTHON_BUILD : <EOL> for scheme in ( '<STR_LIT>' , '<STR_LIT>' ) : <EOL> _SCHEMES . set ( scheme , '<STR_LIT>' , '<STR_LIT>' ) <EOL> _SCHEMES . set ( scheme , '<STR_LIT>' , '<STR_LIT>' ) <EOL> _cfg_read = True <EOL> _SCHEMES = configparser . RawConfigParser ( ) <EOL> _VAR_REPL = re . compile ( r'<STR_LIT>' ) <EOL> def _expand_globals ( config ) : <EOL> _ensure_cfg_read ( ) <EOL> if config . has_section ( '<STR_LIT>' ) : <EOL> globals = config . items ( '<STR_LIT>' ) <EOL> else : <EOL> globals = tuple ( ) <EOL> sections = config . sections ( ) <EOL> for section in sections : <EOL> if section == '<STR_LIT>' : <EOL> continue <EOL> for option , value in globals : <EOL> if config . has_option ( section , option ) : <EOL> continue <EOL> config . set ( section , option , value ) <EOL> config . remove_section ( '<STR_LIT>' ) <EOL> for section in config . sections ( ) : <EOL> variables = dict ( config . items ( section ) ) <EOL> def _replacer ( matchobj ) : <EOL> name = matchobj . group ( <NUM_LIT:1> ) <EOL> if name in variables : <EOL> return variables [ name ] <EOL> return matchobj . group ( <NUM_LIT:0> ) <EOL> for option , value in config . items ( section ) : <EOL> config . set ( section , option , _VAR_REPL . sub ( _replacer , value ) ) <EOL> _PY_VERSION = sys . version . split ( ) [ <NUM_LIT:0> ] <EOL> _PY_VERSION_SHORT = sys . version [ : <NUM_LIT:3> ] <EOL> _PY_VERSION_SHORT_NO_DOT = _PY_VERSION [ <NUM_LIT:0> ] + _PY_VERSION [ <NUM_LIT:2> ] <EOL> _PREFIX = os . path . normpath ( sys . prefix ) <EOL> _EXEC_PREFIX = os . path . normpath ( sys . exec_prefix ) <EOL> _CONFIG_VARS = None <EOL> _USER_BASE = None <EOL> def _subst_vars ( path , local_vars ) : <EOL> """<STR_LIT>""" <EOL> def _replacer ( matchobj ) : <EOL> name = matchobj . group ( <NUM_LIT:1> ) <EOL> if name in local_vars : <EOL> return local_vars [ name ] <EOL> elif name in os . environ : <EOL> return os . environ [ name ] <EOL> return matchobj . group ( <NUM_LIT:0> ) <EOL> return _VAR_REPL . sub ( _replacer , path ) <EOL> def _extend_dict ( target_dict , other_dict ) : <EOL> target_keys = target_dict . keys ( ) <EOL> for key , value in other_dict . items ( ) : <EOL> if key in target_keys : <EOL> continue <EOL> target_dict [ key ] = value <EOL> def _expand_vars ( scheme , vars ) : <EOL> res = { } <EOL> if vars is None : <EOL> vars = { } <EOL> _extend_dict ( vars , get_config_vars ( ) ) <EOL> for key , value in _SCHEMES . items ( scheme ) : <EOL> if os . name in ( '<STR_LIT>' , '<STR_LIT>' ) : <EOL> value = os . path . expanduser ( value ) <EOL> res [ key ] = os . path . normpath ( _subst_vars ( value , vars ) ) <EOL> return res <EOL> def format_value ( value , vars ) : <EOL> def _replacer ( matchobj ) : <EOL> name = matchobj . group ( <NUM_LIT:1> ) <EOL> if name in vars : <EOL> return vars [ name ] <EOL> return matchobj . group ( <NUM_LIT:0> ) <EOL> return _VAR_REPL . sub ( _replacer , value ) <EOL> def _get_default_scheme ( ) : <EOL> if os . name == '<STR_LIT>' : <EOL> return '<STR_LIT>' <EOL> return os . name <EOL> def _getuserbase ( ) : <EOL> env_base = os . environ . get ( "<STR_LIT>" , None ) <EOL> def joinuser ( * args ) : <EOL> return os . path . expanduser ( os . path . join ( * args ) ) <EOL> if os . name == "<STR_LIT>" : <EOL> base = os . environ . get ( "<STR_LIT>" ) or "<STR_LIT>" <EOL> if env_base : <EOL> return env_base <EOL> else : <EOL> return joinuser ( base , "<STR_LIT>" ) <EOL> if sys . platform == "<STR_LIT>" : <EOL> framework = get_config_var ( "<STR_LIT>" ) <EOL> if framework : <EOL> if env_base : <EOL> return env_base <EOL> else : <EOL> return joinuser ( "<STR_LIT>" , "<STR_LIT>" , framework , "<STR_LIT>" % <EOL> sys . version_info [ : <NUM_LIT:2> ] ) <EOL> if env_base : <EOL> return env_base <EOL> else : <EOL> return joinuser ( "<STR_LIT>" , "<STR_LIT>" ) <EOL> def _parse_makefile ( filename , vars = None ) : <EOL> """<STR_LIT>""" <EOL> _variable_rx = re . compile ( "<STR_LIT>" ) <EOL> _findvar1_rx = re . compile ( r"<STR_LIT>" ) <EOL> _findvar2_rx = re . compile ( r"<STR_LIT>" ) <EOL> if vars is None : <EOL> vars = { } <EOL> done = { } <EOL> notdone = { } <EOL> with codecs . open ( filename , encoding = '<STR_LIT:utf-8>' , errors = "<STR_LIT>" ) as f : <EOL> lines = f . readlines ( ) <EOL> for line in lines : <EOL> if line . startswith ( '<STR_LIT:#>' ) or line . strip ( ) == '<STR_LIT>' : <EOL> continue <EOL> m = _variable_rx . match ( line ) <EOL> if m : <EOL> n , v = m . group ( <NUM_LIT:1> , <NUM_LIT:2> ) <EOL> v = v . strip ( ) <EOL> tmpv = v . replace ( '<STR_LIT>' , '<STR_LIT>' ) <EOL> if "<STR_LIT:$>" in tmpv : <EOL> notdone [ n ] = v <EOL> else : <EOL> try : <EOL> v = int ( v ) <EOL> except ValueError : <EOL> done [ n ] = v . replace ( '<STR_LIT>' , '<STR_LIT:$>' ) <EOL> else : <EOL> done [ n ] = v <EOL> variables = list ( notdone . keys ( ) ) <EOL> renamed_variables = ( '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' ) <EOL> while len ( variables ) > <NUM_LIT:0> : <EOL> for name in tuple ( variables ) : <EOL> value = notdone [ name ] <EOL> m = _findvar1_rx . search ( value ) or _findvar2_rx . search ( value ) <EOL> if m is not None : <EOL> n = m . group ( <NUM_LIT:1> ) <EOL> found = True <EOL> if n in done : <EOL> item = str ( done [ n ] ) <EOL> elif n in notdone : <EOL> found = False <EOL> elif n in os . environ : <EOL> item = os . environ [ n ] <EOL> elif n in renamed_variables : <EOL> if ( name . startswith ( '<STR_LIT>' ) and <EOL> name [ <NUM_LIT:3> : ] in renamed_variables ) : <EOL> item = "<STR_LIT>" <EOL> elif '<STR_LIT>' + n in notdone : <EOL> found = False <EOL> else : <EOL> item = str ( done [ '<STR_LIT>' + n ] ) <EOL> else : <EOL> done [ n ] = item = "<STR_LIT>" <EOL> if found : <EOL> after = value [ m . end ( ) : ] <EOL> value = value [ : m . start ( ) ] + item + after <EOL> if "<STR_LIT:$>" in after : <EOL> notdone [ name ] = value <EOL> else : <EOL> try : <EOL> value = int ( value ) <EOL> except ValueError : <EOL> done [ name ] = value . strip ( ) <EOL> else : <EOL> done [ name ] = value <EOL> variables . remove ( name ) <EOL> if ( name . startswith ( '<STR_LIT>' ) and <EOL> name [ <NUM_LIT:3> : ] in renamed_variables ) : <EOL> name = name [ <NUM_LIT:3> : ] <EOL> if name not in done : <EOL> done [ name ] = value <EOL> else : <EOL> done [ name ] = value <EOL> variables . remove ( name ) <EOL> for k , v in done . items ( ) : <EOL> if isinstance ( v , str ) : <EOL> done [ k ] = v . strip ( ) <EOL> vars . update ( done ) <EOL> return vars <EOL> def get_makefile_filename ( ) : <EOL> """<STR_LIT>""" <EOL> if _PYTHON_BUILD : <EOL> return os . path . join ( _PROJECT_BASE , "<STR_LIT>" ) <EOL> if hasattr ( sys , '<STR_LIT>' ) : <EOL> config_dir_name = '<STR_LIT>' % ( _PY_VERSION_SHORT , sys . abiflags ) <EOL> else : <EOL> config_dir_name = '<STR_LIT>' <EOL> return os . path . join ( get_path ( '<STR_LIT>' ) , config_dir_name , '<STR_LIT>' ) <EOL> def _init_posix ( vars ) : <EOL> """<STR_LIT>""" <EOL> makefile = get_makefile_filename ( ) <EOL> try : <EOL> _parse_makefile ( makefile , vars ) <EOL> except IOError as e : <EOL> msg = "<STR_LIT>" % makefile <EOL> if hasattr ( e , "<STR_LIT>" ) : <EOL> msg = msg + "<STR_LIT>" % e . strerror <EOL> raise IOError ( msg ) <EOL> config_h = get_config_h_filename ( ) <EOL> try : <EOL> with open ( config_h ) as f : <EOL> parse_config_h ( f , vars ) <EOL> except IOError as e : <EOL> msg = "<STR_LIT>" % config_h <EOL> if hasattr ( e , "<STR_LIT>" ) : <EOL> msg = msg + "<STR_LIT>" % e . strerror <EOL> raise IOError ( msg ) <EOL> if _PYTHON_BUILD : <EOL> vars [ '<STR_LIT>' ] = vars [ '<STR_LIT>' ] <EOL> def _init_non_posix ( vars ) : <EOL> """<STR_LIT>""" <EOL> vars [ '<STR_LIT>' ] = get_path ( '<STR_LIT>' ) <EOL> vars [ '<STR_LIT>' ] = get_path ( '<STR_LIT>' ) <EOL> vars [ '<STR_LIT>' ] = get_path ( '<STR_LIT>' ) <EOL> vars [ '<STR_LIT>' ] = '<STR_LIT>' <EOL> vars [ '<STR_LIT>' ] = '<STR_LIT>' <EOL> vars [ '<STR_LIT>' ] = _PY_VERSION_SHORT_NO_DOT <EOL> vars [ '<STR_LIT>' ] = os . path . dirname ( _safe_realpath ( sys . executable ) ) <EOL> def parse_config_h ( fp , vars = None ) : <EOL> """<STR_LIT>""" <EOL> if vars is None : <EOL> vars = { } <EOL> define_rx = re . compile ( "<STR_LIT>" ) <EOL> undef_rx = re . compile ( "<STR_LIT>" ) <EOL> while True : <EOL> line = fp . readline ( ) <EOL> if not line : <EOL> break <EOL> m = define_rx . match ( line ) <EOL> if m : <EOL> n , v = m . group ( <NUM_LIT:1> , <NUM_LIT:2> ) <EOL> try : <EOL> v = int ( v ) <EOL> except ValueError : <EOL> pass <EOL> vars [ n ] = v <EOL> else : <EOL> m = undef_rx . match ( line ) <EOL> if m : <EOL> vars [ m . group ( <NUM_LIT:1> ) ] = <NUM_LIT:0> <EOL> return vars <EOL> def get_config_h_filename ( ) : <EOL> """<STR_LIT>""" <EOL> if _PYTHON_BUILD : <EOL> if os . name == "<STR_LIT>" : <EOL> inc_dir = os . path . join ( _PROJECT_BASE , "<STR_LIT>" ) <EOL> else : <EOL> inc_dir = _PROJECT_BASE <EOL> else : <EOL> inc_dir = get_path ( '<STR_LIT>' ) <EOL> return os . path . join ( inc_dir , '<STR_LIT>' ) <EOL> def get_scheme_names ( ) : <EOL> """<STR_LIT>""" <EOL> return tuple ( sorted ( _SCHEMES . sections ( ) ) ) <EOL> def get_path_names ( ) : <EOL> """<STR_LIT>""" <EOL> return _SCHEMES . options ( '<STR_LIT>' ) <EOL> def get_paths ( scheme = _get_default_scheme ( ) , vars = None , expand = True ) : <EOL> """<STR_LIT>""" <EOL> _ensure_cfg_read ( ) <EOL> if expand : <EOL> return _expand_vars ( scheme , vars ) <EOL> else : <EOL> return dict ( _SCHEMES . items ( scheme ) ) <EOL> def get_path ( name , scheme = _get_default_scheme ( ) , vars = None , expand = True ) : <EOL> """<STR_LIT>""" <EOL> return get_paths ( scheme , vars , expand ) [ name ] <EOL> def get_config_vars ( * args ) : <EOL> """<STR_LIT>""" <EOL> global _CONFIG_VARS <EOL> if _CONFIG_VARS is None : <EOL> _CONFIG_VARS = { } <EOL> _CONFIG_VARS [ '<STR_LIT>' ] = _PREFIX <EOL> _CONFIG_VARS [ '<STR_LIT>' ] = _EXEC_PREFIX <EOL> _CONFIG_VARS [ '<STR_LIT>' ] = _PY_VERSION <EOL> _CONFIG_VARS [ '<STR_LIT>' ] = _PY_VERSION_SHORT <EOL> _CONFIG_VARS [ '<STR_LIT>' ] = _PY_VERSION [ <NUM_LIT:0> ] + _PY_VERSION [ <NUM_LIT:2> ] <EOL> _CONFIG_VARS [ '<STR_LIT>' ] = _PREFIX <EOL> _CONFIG_VARS [ '<STR_LIT>' ] = _EXEC_PREFIX <EOL> _CONFIG_VARS [ '<STR_LIT>' ] = _PROJECT_BASE <EOL> try : <EOL> _CONFIG_VARS [ '<STR_LIT>' ] = sys . abiflags <EOL> except AttributeError : <EOL> _CONFIG_VARS [ '<STR_LIT>' ] = '<STR_LIT>' <EOL> if os . name in ( '<STR_LIT>' , '<STR_LIT>' ) : <EOL> _init_non_posix ( _CONFIG_VARS ) <EOL> if os . name == '<STR_LIT>' : <EOL> _init_posix ( _CONFIG_VARS ) <EOL> if sys . version >= '<STR_LIT>' : <EOL> _CONFIG_VARS [ '<STR_LIT>' ] = _getuserbase ( ) <EOL> if '<STR_LIT>' not in _CONFIG_VARS : <EOL> _CONFIG_VARS [ '<STR_LIT>' ] = _PROJECT_BASE <EOL> else : <EOL> _CONFIG_VARS [ '<STR_LIT>' ] = _safe_realpath ( _CONFIG_VARS [ '<STR_LIT>' ] ) <EOL> if _PYTHON_BUILD and os . name == "<STR_LIT>" : <EOL> base = _PROJECT_BASE <EOL> try : <EOL> cwd = os . getcwd ( ) <EOL> except OSError : <EOL> cwd = None <EOL> if ( not os . path . isabs ( _CONFIG_VARS [ '<STR_LIT>' ] ) and <EOL> base != cwd ) : <EOL> srcdir = os . path . join ( base , _CONFIG_VARS [ '<STR_LIT>' ] ) <EOL> _CONFIG_VARS [ '<STR_LIT>' ] = os . path . normpath ( srcdir ) <EOL> if sys . platform == '<STR_LIT>' : <EOL> kernel_version = os . uname ( ) [ <NUM_LIT:2> ] <EOL> major_version = int ( kernel_version . split ( '<STR_LIT:.>' ) [ <NUM_LIT:0> ] ) <EOL> if major_version < <NUM_LIT:8> : <EOL> for key in ( '<STR_LIT>' , '<STR_LIT>' , <EOL> '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' ) : <EOL> flags = _CONFIG_VARS [ key ] <EOL> flags = re . sub ( '<STR_LIT>' , '<STR_LIT:U+0020>' , flags ) <EOL> flags = re . sub ( '<STR_LIT>' , '<STR_LIT:U+0020>' , flags ) <EOL> _CONFIG_VARS [ key ] = flags <EOL> else : <EOL> if '<STR_LIT>' in os . environ : <EOL> arch = os . environ [ '<STR_LIT>' ] <EOL> for key in ( '<STR_LIT>' , '<STR_LIT>' , <EOL> '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' ) : <EOL> flags = _CONFIG_VARS [ key ] <EOL> flags = re . sub ( '<STR_LIT>' , '<STR_LIT:U+0020>' , flags ) <EOL> flags = flags + '<STR_LIT:U+0020>' + arch <EOL> _CONFIG_VARS [ key ] = flags <EOL> CFLAGS = _CONFIG_VARS . get ( '<STR_LIT>' , '<STR_LIT>' ) <EOL> m = re . search ( '<STR_LIT>' , CFLAGS ) <EOL> if m is not None : <EOL> sdk = m . group ( <NUM_LIT:1> ) <EOL> if not os . path . exists ( sdk ) : <EOL> for key in ( '<STR_LIT>' , '<STR_LIT>' , <EOL> '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' ) : <EOL> flags = _CONFIG_VARS [ key ] <EOL> flags = re . sub ( '<STR_LIT>' , '<STR_LIT:U+0020>' , flags ) <EOL> _CONFIG_VARS [ key ] = flags <EOL> if args : <EOL> vals = [ ] <EOL> for name in args : <EOL> vals . append ( _CONFIG_VARS . get ( name ) ) <EOL> return vals <EOL> else : <EOL> return _CONFIG_VARS <EOL> def get_config_var ( name ) : <EOL> """<STR_LIT>""" <EOL> return get_config_vars ( ) . get ( name ) <EOL> def get_platform ( ) : <EOL> """<STR_LIT>""" <EOL> if os . name == '<STR_LIT>' : <EOL> prefix = "<STR_LIT>" <EOL> i = sys . version . find ( prefix ) <EOL> if i == - <NUM_LIT:1> : <EOL> return sys . platform <EOL> j = sys . version . find ( "<STR_LIT:)>" , i ) <EOL> look = sys . version [ i + len ( prefix ) : j ] . lower ( ) <EOL> if look == '<STR_LIT>' : <EOL> return '<STR_LIT>' <EOL> if look == '<STR_LIT>' : <EOL> return '<STR_LIT>' <EOL> return sys . platform <EOL> if os . name != "<STR_LIT>" or not hasattr ( os , '<STR_LIT>' ) : <EOL> return sys . platform <EOL> osname , host , release , version , machine = os . uname ( ) <EOL> osname = osname . lower ( ) . replace ( '<STR_LIT:/>' , '<STR_LIT>' ) <EOL> machine = machine . replace ( '<STR_LIT:U+0020>' , '<STR_LIT:_>' ) <EOL> machine = machine . replace ( '<STR_LIT:/>' , '<STR_LIT:->' ) <EOL> if osname [ : <NUM_LIT:5> ] == "<STR_LIT>" : <EOL> return "<STR_LIT>" % ( osname , machine ) <EOL> elif osname [ : <NUM_LIT:5> ] == "<STR_LIT>" : <EOL> if release [ <NUM_LIT:0> ] >= "<STR_LIT:5>" : <EOL> osname = "<STR_LIT>" <EOL> release = "<STR_LIT>" % ( int ( release [ <NUM_LIT:0> ] ) - <NUM_LIT:3> , release [ <NUM_LIT:2> : ] ) <EOL> elif osname [ : <NUM_LIT:4> ] == "<STR_LIT>" : <EOL> return "<STR_LIT>" % ( osname , release ) <EOL> elif osname [ : <NUM_LIT:3> ] == "<STR_LIT>" : <EOL> return "<STR_LIT>" % ( osname , version , release ) <EOL> elif osname [ : <NUM_LIT:6> ] == "<STR_LIT>" : <EOL> osname = "<STR_LIT>" <EOL> rel_re = re . compile ( r'<STR_LIT>' ) <EOL> m = rel_re . match ( release ) <EOL> if m : <EOL> release = m . group ( ) <EOL> elif osname [ : <NUM_LIT:6> ] == "<STR_LIT>" : <EOL> cfgvars = get_config_vars ( ) <EOL> macver = cfgvars . get ( '<STR_LIT>' ) <EOL> if True : <EOL> macrelease = macver <EOL> try : <EOL> f = open ( '<STR_LIT>' ) <EOL> except IOError : <EOL> pass <EOL> else : <EOL> try : <EOL> m = re . search ( r'<STR_LIT>' <EOL> r'<STR_LIT>' , f . read ( ) ) <EOL> finally : <EOL> f . close ( ) <EOL> if m is not None : <EOL> macrelease = '<STR_LIT:.>' . join ( m . group ( <NUM_LIT:1> ) . split ( '<STR_LIT:.>' ) [ : <NUM_LIT:2> ] ) <EOL> if not macver : <EOL> macver = macrelease <EOL> if macver : <EOL> release = macver <EOL> osname = "<STR_LIT>" <EOL> if ( ( macrelease + '<STR_LIT:.>' ) >= '<STR_LIT>' and <EOL> '<STR_LIT>' in get_config_vars ( ) . get ( '<STR_LIT>' , '<STR_LIT>' ) . strip ( ) ) : <EOL> machine = '<STR_LIT>' <EOL> cflags = get_config_vars ( ) . get ( '<STR_LIT>' ) <EOL> archs = re . findall ( '<STR_LIT>' , cflags ) <EOL> archs = tuple ( sorted ( set ( archs ) ) ) <EOL> if len ( archs ) == <NUM_LIT:1> : <EOL> machine = archs [ <NUM_LIT:0> ] <EOL> elif archs == ( '<STR_LIT>' , '<STR_LIT>' ) : <EOL> machine = '<STR_LIT>' <EOL> elif archs == ( '<STR_LIT>' , '<STR_LIT>' ) : <EOL> machine = '<STR_LIT>' <EOL> elif archs == ( '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' ) : <EOL> machine = '<STR_LIT>' <EOL> elif archs == ( '<STR_LIT>' , '<STR_LIT>' ) : <EOL> machine = '<STR_LIT>' <EOL> elif archs == ( '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' ) : <EOL> machine = '<STR_LIT>' <EOL> else : <EOL> raise ValueError ( <EOL> "<STR_LIT>" % ( archs , ) ) <EOL> elif machine == '<STR_LIT>' : <EOL> if sys . maxsize >= <NUM_LIT:2> ** <NUM_LIT:32> : <EOL> machine = '<STR_LIT>' <EOL> elif machine in ( '<STR_LIT>' , '<STR_LIT>' ) : <EOL> if sys . maxsize >= <NUM_LIT:2> ** <NUM_LIT:32> : <EOL> machine = '<STR_LIT>' <EOL> else : <EOL> machine = '<STR_LIT>' <EOL> return "<STR_LIT>" % ( osname , release , machine ) <EOL> def get_python_version ( ) : <EOL> return _PY_VERSION_SHORT <EOL> def _print_dict ( title , data ) : <EOL> for index , ( key , value ) in enumerate ( sorted ( data . items ( ) ) ) : <EOL> if index == <NUM_LIT:0> : <EOL> print ( '<STR_LIT>' % ( title ) ) <EOL> print ( '<STR_LIT>' % ( key , value ) ) <EOL> def _main ( ) : <EOL> """<STR_LIT>""" <EOL> print ( '<STR_LIT>' % get_platform ( ) ) <EOL> print ( '<STR_LIT>' % get_python_version ( ) ) <EOL> print ( '<STR_LIT>' % _get_default_scheme ( ) ) <EOL> print ( ) <EOL> _print_dict ( '<STR_LIT>' , get_paths ( ) ) <EOL> print ( ) <EOL> _print_dict ( '<STR_LIT>' , get_config_vars ( ) ) <EOL> if __name__ == '<STR_LIT:__main__>' : <EOL> _main ( ) </s>
