def check_config_h():
 from distutils import sysconfig
 import string
 if (string.find(sys.version, 'GCC') >= 0):
  return (CONFIG_H_OK, "sys.version mentions 'GCC'")
 fn = sysconfig.get_config_h_filename()
 try:
  f = open(fn)
  s = f.read()
  f.close()
 except IOError as exc:
  return (CONFIG_H_UNCERTAIN, ("couldn't read '%s': %s" % (fn, exc.strerror)))
 else:
  if (string.find(s, '__GNUC__') >= 0):
   return (CONFIG_H_OK, ("'%s' mentions '__GNUC__'" % fn))
  else:
   return (CONFIG_H_NOTOK, ("'%s' does not mention '__GNUC__'" % fn))

def check_config_h ( ) : from distutils import sysconfig import string if ( string . find ( sys . version , 'GCC' ) >= 0 ) : return ( CONFIG_H_OK , "sys.version mentions 'GCC'" ) fn = sysconfig . get_config_h_filename ( ) try : f = open ( fn ) s = f . read ( ) f . close ( ) except IOError as exc : return ( CONFIG_H_UNCERTAIN , ( "couldn't read '%s': %s" % ( fn , exc . strerror ) ) ) else : if ( string . find ( s , '__GNUC__' ) >= 0 ) : return ( CONFIG_H_OK , ( "'%s' mentions '__GNUC__'" % fn ) ) else : return ( CONFIG_H_NOTOK , ( "'%s' does not mention '__GNUC__'" % fn ) )
check if the current python installation appears amenable to building extensions with gcc .