(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.base_prefix or
    sys.base_exec_prefix -- i.e., ignore 'plat_specific'.
Return the directory containing installed Python header files.
Return the directory containing installed Python header files .
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.base_prefix or
    sys.base_exec_prefix -- i.e., ignore 'plat_specific'.
    """
    if prefix is None:
        prefix = plat_specific and BASE_EXEC_PREFIX or BASE_PREFIX
    if os.name == "posix":
        if python_build:
            # 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.
            if plat_specific:
                return _sys_home or project_base
            else:
                incdir = os.path.join(get_config_var('srcdir'), 'Include')
                return os.path.normpath(incdir)
        python_dir = 'python' + get_python_version() + build_flags
        return os.path.join(prefix, "include", python_dir)
    elif os.name == "nt":
        if python_build:
            # Include both the include and PC dir to ensure we can find
            # pyconfig.h
            return (os.path.join(prefix, "include") + os.path.pathsep +
                    os.path.join(prefix, "PC"))
        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)
def get_python_inc ( plat_specific = 0 , prefix = None ) : if prefix is None : prefix = plat_specific and BASE_EXEC_PREFIX or BASE_PREFIX if os . name == "posix" : if python_build : # 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. if plat_specific : return _sys_home or project_base else : incdir = os . path . join ( get_config_var ( 'srcdir' ) , 'Include' ) return os . path . normpath ( incdir ) python_dir = 'python' + get_python_version ( ) + build_flags return os . path . join ( prefix , "include" , python_dir ) elif os . name == "nt" : if python_build : # Include both the include and PC dir to ensure we can find # pyconfig.h return ( os . path . join ( prefix , "include" ) + os . path . pathsep + os . path . join ( prefix , "PC" ) ) 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 )