class_docstr: Description of a Pythran extension
  
  Similar to distutils.core.Extension except that the sources are .py files
  They must be processable by pythran, of course.
  
  The compilation process ends up in a native Python module.
class_docstr_tok: ["Description","of","a","Pythran","extension","Similar","to","distutils.core.Extension","except","that","the","sources","are",".py","files","They","must","be","processable","by","pythran",",","of","course",".","The","compilation","process","ends","up","in","a","native","Python","module","."]
code: def sources(self):
      import pythran.toolchain as tc
  
      cxx_sources = []
      for source in self._sources:
          base, ext = os.path.splitext(source)
          if ext != ".py":
              cxx_sources.append(source)
              continue
          output_file = base + ".cpp"  # target name
  
          if os.path.exists(source) and (
              not os.path.exists(output_file)
              or os.path.getmtime(output_file)
              < os.path.getmtime(source)
          ):
              # get the last name in the path
              if "." in self.name:
                  module_name = os.path.splitext(self.name)[-1][1:]
              else:
                  module_name = self.name
              tc.compile_pythranfile(
                  source, output_file, module_name, cpponly=True
              )
          cxx_sources.append(output_file)
      return cxx_sources
  
file_path: catboost/contrib/python/pythran/pythran/dist.py
imports: import pythran.config
  from collections import defaultdict
  import os.path
  import os
  import setuptools
  from distutils.command.build_ext import build_ext
label_desc: Use image node_id 2 for calling the PythranExtension obj's underlying member method code with example usage: obj.sources() and returns: cxx_sources