def osx_clang_fix():
 if (sys.platform != 'darwin'):
  return
 if (sys.version_info[0] >= 3):
  from subprocess import getoutput
 else:
  from commands import getoutput
 cc = getoutput('cc -v')
 if (('gcc' in cc) or ('clang' not in cc)):
  return
 for flag in ['CFLAGS', 'CPPFLAGS']:
  if (flag not in os.environ):
   os.environ[flag] = '-Qunused-arguments'
  elif ('-Qunused-arguments' not in os.environ[flag]):
   os.environ[flag] += ' -Qunused-arguments'

def osx_clang_fix ( ) : if ( sys . platform != 'darwin' ) : return if ( sys . version_info [ 0 ] >= 3 ) : from subprocess import getoutput else : from commands import getoutput cc = getoutput ( 'cc -v' ) if ( ( 'gcc' in cc ) or ( 'clang' not in cc ) ) : return for flag in [ 'CFLAGS' , 'CPPFLAGS' ] : if ( flag not in os . environ ) : os . environ [ flag ] = '-Qunused-arguments' elif ( '-Qunused-arguments' not in os . environ [ flag ] ) : os . environ [ flag ] += ' -Qunused-arguments'
add clang switch to ignore unused arguments to avoid os x compile error .