def build_from_c_and_cpp_files(extensions):
 for extension in extensions:
  sources = []
  for sfile in extension.sources:
   (path, ext) = os.path.splitext(sfile)
   if (ext in ('.pyx', '.py')):
    if (extension.language == 'c++'):
     ext = '.cpp'
    else:
     ext = '.c'
    sfile = (path + ext)
   sources.append(sfile)
  extension.sources = sources

def build_from_c_and_cpp_files ( extensions ) : for extension in extensions : sources = [ ] for sfile in extension . sources : ( path , ext ) = os . path . splitext ( sfile ) if ( ext in ( '.pyx' , '.py' ) ) : if ( extension . language == 'c++' ) : ext = '.cpp' else : ext = '.c' sfile = ( path + ext ) sources . append ( sfile ) extension . sources = sources
modify the extensions to build from the .