Microsoft Windows SDK Libraries Paths
500209
def OSLibpath(self):
        
        ref = os.path.join(self.si.WindowsSdkDir, 'References')
        libpath = []

        if self.vc_ver <= 9.0:
            libpath += self.OSLibraries

        if self.vc_ver >= 11.0:
            libpath += [os.path.join(ref, r'CommonConfiguration\Neutral')]

        if self.vc_ver >= 14.0:
            libpath += [
                ref,
                os.path.join(self.si.WindowsSdkDir, 'UnionMetadata'),
                os.path.join(
                    ref,
                    'Windows.Foundation.UniversalApiContract',
                    '1.0.0.0',
                ),
                os.path.join(
                    ref,
                    'Windows.Foundation.FoundationContract',
                    '1.0.0.0',
                ),
                os.path.join(
                    ref,
                    'Windows.Networking.Connectivity.WwanContract',
                    '1.0.0.0',
                ),
                os.path.join(
                    self.si.WindowsSdkDir,
                    'ExtensionSDKs',
                    'Microsoft.VCLibs',
                    '%0.1f' % self.vc_ver,
                    'References',
                    'CommonConfiguration',
                    'neutral',
                ),
            ]
        return libpath
431848
def OSIncludes(self):
        
        include = os.path.join(self.si.WindowsSdkDir, 'include')

        if self.vc_ver <= 10.0:
            return [include, os.path.join(include, 'gl')]

        else:
            if self.vc_ver >= 14.0:
                sdkver = self._sdk_subdir
            else:
                sdkver = ''
            return [os.path.join(include, '%sshared' % sdkver),
                    os.path.join(include, '%sum' % sdkver),
                    os.path.join(include, '%swinrt' % sdkver)]
1008194
def NetFxSDKLibraries(self):
        
        if self.vc_ver < 14.0 or not self.si.NetFxSdkDir:
            return []

        arch_subdir = self.pi.target_dir(x64=True)
        return [os.path.join(self.si.NetFxSdkDir, r'lib\um%s' % arch_subdir)]
937620
def path(self):
        """"""
        names = []
        obj = self
        while obj:
            names.insert(0, obj.name)
            obj = obj.parent_dir
        sep = self.filesystem._path_separator(self.name)
        if names[0] == sep:
            names.pop(0)
            dir_path = sep.join(names)
            # Windows paths with drive have a root separator entry
            # which should be removed
            is_drive = names and len(names[0]) == 2 and names[0][1] == ':'
            if not is_drive:
                dir_path = sep + dir_path
        else:
            dir_path = sep.join(names)
        dir_path = self.filesystem.absnormpath(dir_path)
        return dir_path
323719
def join_path(*components):
        
        if components:
            path = components[0]
            for next in components[1:]:
                path = win32.PathAppend(path, next)
        else:
            path = ""
        return path
347518
def WindowsSDKExecutablePath(self):
        
        # Find WinSDK NetFx Tools registry dir name
        if self.vc_ver <= 11.0:
            netfxver = 35
            arch = ''
        else:
            netfxver = 40
            hidex86 = True if self.vc_ver <= 12.0 else False
            arch = self.pi.current_dir(x64=True, hidex86=hidex86)
        fx = 'WinSDK-NetFx%dTools%s' % (netfxver, arch.replace('\\', '-'))

        # liste all possibles registry paths
        regpaths = []
        if self.vc_ver >= 14.0:
            for ver in self.NetFxSdkVersion:
                regpaths += [os.path.join(self.ri.netfx_sdk, ver, fx)]

        for ver in self.WindowsSdkVersion:
            regpaths += [os.path.join(self.ri.windows_sdk, 'v%sA' % ver, fx)]

        # Return installation folder from the more recent path
        for path in regpaths:
            execpath = self.ri.lookup(path, 'installationfolder')
            if execpath:
                break
        return execpath
869391
def find_lib_path():
    
    curr_path = os.path.dirname(os.path.abspath(os.path.expanduser(__file__)))
    # make pythonpack hack: copy this directory one level upper for setup.py
    dll_path = [curr_path, os.path.join(curr_path, '../../wrapper/'),
                os.path.join(curr_path, './wrapper/')]
    if os.name == 'nt':
        if platform.architecture()[0] == '64bit':
            dll_path.append(os.path.join(curr_path, '../../windows/x64/Release/'))
            # hack for pip installation when copy all parent source directory here
            dll_path.append(os.path.join(curr_path, './windows/x64/Release/'))
        else:
            dll_path.append(os.path.join(curr_path, '../../windows/Release/'))
            # hack for pip installation when copy all parent source directory here
            dll_path.append(os.path.join(curr_path, './windows/Release/'))
    if os.name == 'nt':
        dll_path = [os.path.join(p, 'xgboost_wrapper.dll') for p in dll_path]
    else:
        dll_path = [os.path.join(p, 'libxgboostwrapper.so') for p in dll_path]
    lib_path = [p for p in dll_path if os.path.exists(p) and os.path.isfile(p)]
    #From github issues, most of installation errors come from machines w/o compilers
    if len(lib_path) == 0 and not os.environ.get('XGBOOST_BUILD_DOC', False):
        raise XGBoostLibraryNotFound(
            'Cannot find XGBoost Libarary in the candicate path, ' +
            'did you install compilers and run build.sh in root path?\n'
            'List of candidates:\n' + ('\n'.join(dll_path)))
    return lib_path
1283533
def library_directories(self) -> typing.List[str]:
        
        def listify(value):
            return [value] if isinstance(value, str) else list(value)

        # If this is a project running remotely remove external library
        # folders as the remote shared libraries folder will contain all
        # of the necessary dependencies
        is_local_project = not self.is_remote_project
        folders = [
            f
            for f in listify(self.settings.fetch('library_folders', ['libs']))
            if is_local_project or not f.startswith('..')
        ]

        # Include the remote shared library folder as well
        folders.append('../__cauldron_shared_libs')

        # Include the project directory as well
        folders.append(self.source_directory)

        return [
            environ.paths.clean(os.path.join(self.source_directory, folder))
            for folder in folders
        ]
914840
function getWillowProgDataPaths () {
    if (!process.env.systemdrive) {
        // running on linux/osx?
        return [];
    }
    var instancesRoot = path.join(process.env.systemdrive, 'ProgramData/Microsoft/VisualStudio/Packages/_Instances');
    if (!shell.test('-d', instancesRoot)) {
        // can't seem to find VS instances dir, return empty result
        return [];
    }

    return fs.readdirSync(instancesRoot).map(function (file) {
        var instanceDir = path.join(instancesRoot, file);
        if (shell.test('-d', instanceDir)) {
            return instanceDir;
        }
    }).filter(function (progDataPath) {
        // make sure state.json exists
        return shell.test('-e', path.join(progDataPath, 'state.json'));
    });
}
713799
function getAppsDataDir(){
	switch(process.platform){
		case 'win32': return process.env.LOCALAPPDATA;
		case 'linux': return process.env.HOME + '/.config';
		case 'darwin': return process.env.HOME + '/Library/Application Support';
		default: throw Error("unknown platform "+process.platform);
	}
}
143860
def libpath(self):
        
        from os import path
        return path.join(self.dirpath, self.libname)
821332
def get_static_lib_paths():
    
    libs = []
    is_linux = sys.platform.startswith('linux')
    if is_linux:
        libs += ['-Wl,--start-group']
    libs += get_raw_static_lib_path()
    if is_linux:
        libs += ['-Wl,--end-group']
    return libs
452013
function getPaths() {
  return new Promise((resolve, reject) => {
    let paths = [];

    const walker = walk(sourceDir);
    walker.on('file', (root, stats, next) => {
      const sourcePath = path.join(root, stats.name);
      if (/\.js$/.test(sourcePath)) {
        paths.push(sourcePath);
      }
      next();
    });
    walker.on('errors', () => {
      reject(new Error(`Trouble walking ${sourceDir}`));
    });

    walker.on('end', () => {
      /**
       * Windows has restrictions on length of command line, so passing all the
       * changed paths to a task will fail if this limit is exceeded.
       * To get round this, if this is Windows and there are newer files, just
       * pass the sourceDir to the task so it can do the walking.
       */
      if (isWindows) {
        paths = [sourceDir];
      }

      resolve(paths);
    });
  });
}
1088056
def get_system_path():
    """"""
    _bpath = []
    if is_win:
        try:
            import win32api
        except ImportError:
            logger.warn("Cannot determine your Windows or System directories")
            logger.warn("Please add them to your PATH if .dlls are not found")
            logger.warn("or install http://sourceforge.net/projects/pywin32/")
        else:
            sysdir = win32api.GetSystemDirectory()
            sysdir2 = os.path.normpath(os.path.join(sysdir, '..', 'SYSTEM'))
            windir = win32api.GetWindowsDirectory()
            _bpath = [sysdir, sysdir2, windir]
    _bpath.extend(compat.getenv('PATH', '').split(os.pathsep))
    return _bpath
1230144
def find_lib_path():
    
    if os.environ.get('LIGHTGBM_BUILD_DOC', False):
        # we don't need lib_lightgbm while building docs
        return []

    curr_path = os.path.dirname(os.path.abspath(os.path.expanduser(__file__)))
    dll_path = [curr_path,
                os.path.join(curr_path, '../../'),
                os.path.join(curr_path, 'compile'),
                os.path.join(curr_path, '../compile'),
                os.path.join(curr_path, '../../lib/')]
    if system() in ('Windows', 'Microsoft'):
        dll_path.append(os.path.join(curr_path, '../compile/Release/'))
        dll_path.append(os.path.join(curr_path, '../compile/windows/x64/DLL/'))
        dll_path.append(os.path.join(curr_path, '../../Release/'))
        dll_path.append(os.path.join(curr_path, '../../windows/x64/DLL/'))
        dll_path = [os.path.join(p, 'lib_lightgbm.dll') for p in dll_path]
    else:
        dll_path = [os.path.join(p, 'lib_lightgbm.so') for p in dll_path]
    lib_path = [p for p in dll_path if os.path.exists(p) and os.path.isfile(p)]
    if not lib_path:
        dll_path = [os.path.realpath(p) for p in dll_path]
        raise Exception('Cannot find lightgbm library file in following paths:\n' + '\n'.join(dll_path))
    return lib_path
542877
def filepaths(self):
        
        return nativestring(self._filepathEdit.text()).split(os.path.pathsep)
707478
def _get_library_search_paths():
    
    search_paths = [
        '',
        '/usr/lib64',
        '/usr/local/lib64',
        '/usr/lib', '/usr/local/lib',
        '/run/current-system/sw/lib',
        '/usr/lib/x86_64-linux-gnu/',
        os.path.abspath(os.path.dirname(__file__))
    ]

    if sys.platform == 'darwin':
        path_environment_variable = 'DYLD_LIBRARY_PATH'
    else:
        path_environment_variable = 'LD_LIBRARY_PATH'
    if path_environment_variable in os.environ:
        search_paths.extend(os.environ[path_environment_variable].split(':'))
    return search_paths