Preprocesses the fallback include and library paths depending on the
    platform.
779727
def preprocess_fallback_config():
    """"""
    global LIBIGRAPH_FALLBACK_INCLUDE_DIRS
    global LIBIGRAPH_FALLBACK_LIBRARY_DIRS
    global LIBIGRAPH_FALLBACK_LIBRARIES
    
    if os.name == 'nt' and distutils.ccompiler.get_default_compiler() == 'msvc':
        # if this setup is run in the source checkout *and* the igraph msvc was build,
        # this code adds the right library and include dir
        version = '';
        if sys.version_info >= (2, 7) and sys.version_info < (3, 0):
          version = '27';
        elif sys.version_info >= (3, 4) and sys.version_info < (3, 5):
          version ='34';
        elif sys.version_info >= (3, 5):
          version ='35';
        all_msvc_dirs = glob.glob(os.path.join('..', 'igraph', 'igraph-*-msvc-py{0}'.format(version)))
        if len(all_msvc_dirs) > 0:
            if len(all_msvc_dirs) > 1:
                print("More than one MSVC build directory (igraph-*-msvc-py{0}) found!".format(version))
                print("It could happen that setup.py uses the wrong one! Please remove all but the right one!\n\n")

            msvc_builddir = all_msvc_dirs[-1]
            if not os.path.exists(os.path.join(msvc_builddir, "Release")):
                print("There is no 'Release' dir in the MSVC build directory\n(%s)" % msvc_builddir)
                print("Please build the MSVC build first!\n")
            else:
                print("Using MSVC build dir as a fallback: %s\n\n" % msvc_builddir)

                LIBIGRAPH_FALLBACK_INCLUDE_DIRS = [os.path.join(msvc_builddir, "include")]

                is_64bits = sys.maxsize > 2**32
                LIBIGRAPH_FALLBACK_LIBRARY_DIRS = [os.path.join(msvc_builddir, "Release", "x64" if is_64bits else "win32")]
472202
private List<String> getGlobalBundleDependencies(GlobalPostProcessingContext ctx, List<String> excludedBundles) {
		List<JoinableResourceBundle> globalBundles = getRsBundlesHandler(ctx).getGlobalBundles();
		List<String> globalBundleDependencies = new ArrayList<>();
		for (JoinableResourceBundle globalBundle : globalBundles) {
			if (!excludedBundles.contains(globalBundle.getName())) {
				globalBundleDependencies.add(globalBundle.getName());
			}
		}
		return globalBundleDependencies;
	}
652903
def getThirdpartyLibs(self, libs, configuration = 'Development', includePlatformDefaults = True):
		
		if includePlatformDefaults == True:
			libs = self._defaultThirdpartyLibs() + libs
		interrogator = self._getUE4BuildInterrogator()
		return interrogator.interrogate(self.getPlatformIdentifier(), configuration, libs, self._getLibraryOverrides())
1098496
def calculate_include_paths(targets, is_thrift_target):
  

  basedirs = set()
  def collect_paths(target):
    basedirs.add(target.target_base)

  for target in targets:
    target.walk(collect_paths, predicate=is_thrift_target)
  return basedirs
1287918
def use_educated_guess(self):
        """"""

        preprocess_fallback_config()

        global LIBIGRAPH_FALLBACK_LIBRARIES
        global LIBIGRAPH_FALLBACK_INCLUDE_DIRS
        global LIBIGRAPH_FALLBACK_LIBRARY_DIRS

        print("WARNING: we were not able to detect where igraph is installed on")
        print("your machine (if it is installed at all). We will use the fallback")
        print("library and include paths hardcoded in setup.py and hope that the")
        print("C core of igraph is installed there.")
        print("")
        print("If the compilation fails and you are sure that igraph is installed")
        print("on your machine, adjust the following two variables in setup.py")
        print("accordingly and try again:")
        print("")
        print("- LIBIGRAPH_FALLBACK_INCLUDE_DIRS",
            LIBIGRAPH_FALLBACK_INCLUDE_DIRS)
        print("- LIBIGRAPH_FALLBACK_LIBRARY_DIRS",
            LIBIGRAPH_FALLBACK_LIBRARY_DIRS)
        print("")

        seconds_remaining = 10 if self.wait else 0
        while seconds_remaining > 0:
            if seconds_remaining > 1:
                plural = "s"
            else:
                plural = ""

            sys.stdout.write("\rContinuing in %2d second%s; press Enter to continue "
                    "immediately. " % (seconds_remaining, plural))
            sys.stdout.flush()

            if os.name == 'nt':
              if msvcrt.kbhit():
                  if msvcrt.getch() == b'\r': # not '\n'
                      break
              time.sleep(1)
            else:
              rlist, _, _ = select([sys.stdin], [], [], 1)
              if rlist:
                  sys.stdin.readline()
                  break

            seconds_remaining -= 1
        sys.stdout.write("\r" + " "*65 + "\r")

        self.libraries = LIBIGRAPH_FALLBACK_LIBRARIES[:]
        if self.static_extension:
            self.libraries.extend(["xml2", "z", "m", "stdc++"])
        self.include_dirs = LIBIGRAPH_FALLBACK_INCLUDE_DIRS[:]
        self.library_dirs = LIBIGRAPH_FALLBACK_LIBRARY_DIRS[:]
447883
function prepBuildFiles(root) {
    var propertiesObj = readProjectProperties(path.join(PLATFORM_DIR, 'project.properties'));
    var subProjects = propertiesObj.libs;
    // Update dependencies within build.gradle.
    var buildGradle = fs.readFileSync(path.join(PLATFORM_DIR, 'plugin-build.gradle'), 'utf-8');
    var depsList = '';
    subProjects.forEach(function (p) {
        var libName = p.replace(/[/\\]/g, ':').replace(name + '-', '');
        depsList += 'debugCompile project(path: "' + libName + '", configuration: "debug")\n';
        depsList += 'releaseCompile project(path: "' + libName + '", configuration: "release")\n';
    });
    // For why we do this mapping: https://issues.apache.org/jira/browse/CB-8390
    var SYSTEM_LIBRARY_MAPPINGS = [
        [/^\/?extras\/android\/support\/(.*)$/, 'com.android.support:support-$1:+'],
        [/^\/?google\/google_play_services\/libproject\/google-play-services_lib\/?$/, 'com.google.android.gms:play-services:+']
    ];
    propertiesObj.systemLibs.forEach(function (p) {
        var mavenRef;
        // It's already in gradle form if it has two ':'s
        if (/:.*:/.exec(p)) {
            mavenRef = p;
        } else {
            for (var i = 0; i < SYSTEM_LIBRARY_MAPPINGS.length; ++i) {
                var pair = SYSTEM_LIBRARY_MAPPINGS[i];
                if (pair[0].exec(p)) {
                    mavenRef = p.replace(pair[0], pair[1]);
                    break;
                }
            }
            if (!mavenRef) {
                throw new error('Unsupported system library (does not work with gradle): ' + p);
            }
        }
        depsList += 'compile "' + mavenRef + '"\n';
    });
    buildGradle = buildGradle.replace(/(SUB-PROJECT DEPENDENCIES START)[\s\S]*(\/\/ SUB-PROJECT DEPENDENCIES END)/, '$1\n' + depsList + '    $2');
    var includeList = '';
    propertiesObj.gradleIncludes.forEach(function (includePath) {
        includeList += 'apply from: "$projectDir/../../platforms/android/' + includePath + '"\n';
    });
    buildGradle = buildGradle.replace(/(PLUGIN GRADLE EXTENSIONS START)[\s\S]*(\/\/ PLUGIN GRADLE EXTENSIONS END)/, '$1\n' + includeList + '$2');
    fs.writeFileSync(path.join(PLATFORM_DIR, 'plugin-build.gradle'), buildGradle);
}
310421
def getThirdPartyLibIncludeDirs(self, libs):
		
		platformDefaults = True
		if libs[0] == '--nodefaults':
			platformDefaults = False
			libs = libs[1:]
		
		details = self.getThirdpartyLibs(libs, includePlatformDefaults=platformDefaults)
		return details.getIncludeDirectories(self.getEngineRoot(), delimiter='\n')
342378
function buildDependencyPaths(self, context) {
  var dependencies = {};

  context.__dependencyPaths__.forEach(function (p) {
    var dep = new DependencyFile(p, self.environment.stat(p).mtime,
                                 self.environment.getFileDigest(p));
    dependencies[JSON.stringify(dep)] = dep;
  });

  _.forEach(context.__dependencyAssets__, function (p) {
    var dep, asset;

    if (p === self.pathname) {
      dep = new DependencyFile(p, self.environment.stat(p).mtime,
                               self.environment.getFileDigest(p));
      dependencies[JSON.stringify(dep)] = dep;
      return;
    }

    asset = self.environment.findAsset(p, { bundle: false });

    if (asset) {
      asset.dependencyPaths.forEach(function (dep) {
        dependencies[JSON.stringify(dep)] = dep;
      });
    }
  });

  prop(self, '__dependencyPaths__', _.values(dependencies));
}
1076225
def preprocess(config):
    """"""

    def aux(ctx, service_name, service):
        compiler, _ = get_compiler(config, service)
        r2 = compiler.preprocess(ctx, service_name, service)
        ctx = ctx + [service_name]
        for child_name, child in compiler.children(service):
            r2[child_name] = aux(ctx, child_name, child)
        return r2

    r = {
        'environments': config['environments'],
    }

    for service_name, service in services(config):
        r[service_name] = aux([], service_name, service)

    return r
114987
def getIncludeAndRuntime():
    
    include_dirs, library_dirs = [], []

    py_include = distutils.sysconfig.get_python_inc()
    plat_py_include = distutils.sysconfig.get_python_inc(plat_specific=1)

    include_dirs.append(py_include)
    if plat_py_include != py_include:
        include_dirs.append(plat_py_include)

    if os.name == 'nt':
        library_dirs.append(os.path.join(sys.exec_prefix, 'libs'))
        include_dirs.append(os.path.join(sys.exec_prefix, 'PC'))

        MSVC_VERSION = int(distutils.msvccompiler.get_build_version())
        if MSVC_VERSION == 14:
            library_dirs.append(os.path.join(sys.exec_prefix, 'PC', 'VS14',
                                             'win32release'))
        elif MSVC_VERSION == 9:
            suffix = '' if PLATFORM == 'win32' else PLATFORM[4:]
            new_lib = os.path.join(sys.exec_prefix, 'PCbuild')
            if suffix:
                new_lib = os.path.join(new_lib, suffix)
            library_dirs.append(new_lib)
        elif MSVC_VERSION == 8:
            library_dirs.append(os.path.join(sys.exec_prefix, 'PC', 'VS8.0',
                                             'win32release'))
        elif MSVC_VERSION == 7:
            library_dirs.append(os.path.join(sys.exec_prefix, 'PC', 'VS7.1'))
        else:
            library_dirs.append(os.path.join(sys.exec_prefix, 'PC', 'VC6'))

    if os.name == 'os2':
        library_dirs.append(os.path.join(sys.exec_prefix, 'Config'))

    is_cygwin = sys.platform[:6] == 'cygwin'
    is_atheos = sys.platform[:6] == 'atheos'
    is_shared = distutils.sysconfig.get_config_var('Py_ENABLE_SHARED')
    is_linux = sys.platform.startswith('linux')
    is_gnu = sys.platform.startswith('gnu')
    is_sunos = sys.platform.startswith('sunos')

    if is_cygwin or is_atheos:
        if sys.executable.startswith(os.path.join(sys.exec_prefix, "bin")):
            library_dirs.append(os.path.join(sys.prefix, "lib", BASENAME,
                                             "config"))
        else:
            library_dirs.append(os.getcwd())

    if (is_linux or is_gnu or is_sunos) and is_shared:
        if sys.executable.startswith(os.path.join(sys.exec_prefix, "bin")):
            library_dirs.append(distutils.sysconfig.get_config_var('LIBDIR'))
        else:
            library_dirs.append(os.getcwd())

    user_include = os.path.join(site.USER_BASE, "include")
    user_lib = os.path.join(site.USER_BASE, "lib")
    if os.path.isdir(user_include):
        include_dirs.append(user_include)
    if os.path.isdir(user_lib):
        library_dirs.append(user_lib)

    ret_object = (include_dirs, library_dirs)
    _filter_non_existing_dirs(ret_object)

    return ret_object
1363064
protected function includeDependencies()
    {
        $view = $this->getView();
        $view->headScript()->appendFile($view->basePath() . '/js/bootstrap-colorpicker.js');
        $view->headLink()->prependStylesheet($view->basePath() . '/css/colorpicker.css');
    }
131364
function fallBack () {
      var programFilesVar = "ProgramFiles";
      if (arch === "(64)") {
        console.warn("You are using 32-bit version of Firefox on 64-bit versions of the Windows.\nSome features may not work correctly in this version. You should upgrade Firefox to the latest 64-bit version now!")
        programFilesVar = "ProgramFiles(x86)";
      }
      resolve(path.join(process.env[programFilesVar], appName, "firefox.exe"));
    }
996052
def replace_static_libraries(self, exclusions=None):
        """"""
        if "stdc++" not in self.libraries:
            self.libraries.append("stdc++")

        if exclusions is None:
            exclusions = []

        for library_name in set(self.libraries) - set(exclusions):
            static_lib = find_static_library(library_name, self.library_dirs)
            if static_lib:
                self.libraries.remove(library_name)
                self.extra_objects.append(static_lib)
1269360
protected function configureIncludePaths()
    {
        // get ini include path and split it to an array
        $iniIncludePaths = explode(PATH_SEPARATOR, ini_get('include_path'));

        // default entry
        $includePathsDoozr = '.';

        // build Doozr include paths
        foreach (self::$path as $path) {
            $includePathsDoozr .= self::buildPath($path);
        }

        if (!empty($iniIncludePaths)) {
            foreach ($iniIncludePaths as $iniIncludePath) {
                // If '.' or existing path -> do not attach twice
                if (in_array($iniIncludePath, self::$path) || trim($iniIncludePath) == '.') {
                    continue;
                }

                $includePathsDoozr .= self::buildPath($iniIncludePath);
            }
        }

        // Now try to set the ini value include_path
        ini_set('include_path', $includePathsDoozr);

        return $this;
    }
692271
function bundlePreprocessor(config) {

    var debug = config.browserify && config.browserify.debug;

    function updateSourceMap(file, content) {
      var map;

      if (debug) {

        map = extractSourceMap(content);

        file.sourceMap = map && map.sourcemap;
      }
    }

    return function(content, file, done) {

      if (b._builtOnce) {
        updateSourceMap(file, content);
        return done(content);
      }

      log.debug('building bundle');

      // wait for the initial bundle to be created
      b.deferredBundle(function(err, content) {

        b._builtOnce = config.autoWatch;

        if (err) {
          return done(BUNDLE_ERROR_TPL);
        }

        content = content.toString('utf-8');
        updateSourceMap(file, content);

        log.info('bundle built');

        done(content);
      });
    };
  }
244564
function lookForExternalDependenciesRES( _def, resources, depFile ) {
  if ( !_def ) return;
  try {
    const def = convertExternalDependencyDefinition( _def );
    for ( const dep of Object.keys( def ) ) {
      if ( def[ dep ] === "" ) {
        // `res: { "bob/foo.png": "" }` is equivalent to
        // `res: { "bob/foo.png": "bob/foo.png" }`
        def[ dep ] = dep;
      }
      const
      srcDep = Project.srcOrLibPath( `mod/${dep}` ) ||
        Project.srcOrLibPath( dep );
      if ( !srcDep ) {
        Fatal.fire(
          `Unable to find dependency file "${dep}" nor "mod/${dep}"!`,
          depFile.getAbsoluteFilePath()
        );
      }
      resources[ srcDep ] = Project.wwwPath( def[ dep ] );
    }
  } catch ( ex ) {
    Fatal.fire(
      `Unable to parse RES dependencies: ${JSON.stringify(_def)}!\n${ex}`,
      depFile
    );
  }
}
500384
public void preProcess(DirContext ctx) throws NamingException {
        for (DirContextProcessor processor : dirContextProcessors) {
            processor.preProcess(ctx);
        }
    }