parameters: (plat_specific=0, prefix=None)
docstring: Return the directory containing installed Python header files.
  
      If 'plat_specific' is false (the default), this is the path to the
      non-platform-specific header files, i.e. Python.h and so on;
      otherwise, this is the path to platform-specific header files
      (namely pyconfig.h).
  
      If 'prefix' is supplied, use it instead of sys.prefix or
      sys.exec_prefix -- i.e., ignore 'plat_specific'.
docstring_summary: Return the directory containing installed Python header files.
docstring_tokens: Return the directory containing installed Python header files .
function: def get_python_inc(plat_specific=0, prefix=None):
      """Return the directory containing installed Python header files.
  
      If 'plat_specific' is false (the default), this is the path to the
      non-platform-specific header files, i.e. Python.h and so on;
      otherwise, this is the path to platform-specific header files
      (namely pyconfig.h).
  
      If 'prefix' is supplied, use it instead of sys.prefix or
      sys.exec_prefix -- i.e., ignore 'plat_specific'.
      """
      if prefix is None:
          prefix = plat_specific and EXEC_PREFIX or PREFIX
  
      # GCC(mingw): os.name is "nt" but build system is posix
      if os.name == "posix" or sys.version.find('GCC') >= 0:
          if python_build:
              # NOTE: sysconfig.py-20091210
              # Assume the executable is in the build directory.  The
              # pyconfig.h file should be in the same directory.  Since
              # the build directory may not be the source directory, we
              # must use "srcdir" from the makefile to find the "Include"
              # directory.
              base = os.path.dirname(os.path.abspath(sys.executable))
              if plat_specific:
                  return base
              else:
                  incdir = os.path.join(get_config_var('srcdir'), 'Include')
                  return os.path.normpath(incdir)
          return os.path.join(prefix, "include", "python" + get_python_version())
      elif os.name == "nt":
          return os.path.join(prefix, "include")
      elif os.name == "os2":
          return os.path.join(prefix, "Include")
      else:
          raise DistutilsPlatformError(
              "I don't know where Python installs its C header files "
              "on platform '%s'" % os.name)
function_tokens: def get_python_inc ( plat_specific = 0 , prefix = None ) : if prefix is None : prefix = plat_specific and EXEC_PREFIX or PREFIX # GCC(mingw): os.name is "nt" but build system is posix if os . name == "posix" or sys . version . find ( 'GCC' ) >= 0 : if python_build : # NOTE: sysconfig.py-20091210 # Assume the executable is in the build directory.  The # pyconfig.h file should be in the same directory.  Since # the build directory may not be the source directory, we # must use "srcdir" from the makefile to find the "Include" # directory. base = os . path . dirname ( os . path . abspath ( sys . executable ) ) if plat_specific : return base else : incdir = os . path . join ( get_config_var ( 'srcdir' ) , 'Include' ) return os . path . normpath ( incdir ) return os . path . join ( prefix , "include" , "python" + get_python_version ( ) ) elif os . name == "nt" : return os . path . join ( prefix , "include" ) elif os . name == "os2" : return os . path . join ( prefix , "Include" ) else : raise DistutilsPlatformError ( "I don't know where Python installs its C header files " "on platform '%s'" % os . name )