Sets a standard set of environment variables for the build system to
        use
483027
def set_standard_vars(cls, executor, context, variant, build_type,
                          install, build_path, install_path=None):
        
        vars = cls.get_standard_vars(context=context,
                                     variant=variant,
                                     build_type=build_type,
                                     install=install,
                                     build_path=build_path,
                                     install_path=install_path)

        for var, value in vars.iteritems():
            executor.env[var] = value
1348807
def get_env_variable(var_name, default=None):
    """"""
    try:
        return os.environ[var_name]
    except KeyError:
        if default is None:
            error_msg = "Set the %s environment variable" % var_name
            raise ImproperlyConfigured(error_msg)
        else:
            return default
1117828
def _setup_environment(self, environments):
        """"""
        # If keepEnv is set or sudo is used, start from a fresh environment,
        # otherwise with the current one.
        # keepEnv specifies variables to copy from the current environment,
        # newEnv specifies variables to set to a new value,
        # additionalEnv specifies variables where some value should be appended, and
        # clearEnv specifies variables to delete.
        if self._user is not None or environments.get("keepEnv", None) is not None:
            run_environment = {}
        else:
            run_environment = os.environ.copy()
        for key, value in environments.get("keepEnv", {}).items():
            if key in os.environ:
                run_environment[key] = os.environ[key]
        for key, value in environments.get("newEnv", {}).items():
            run_environment[key] = value
        for key, value in environments.get("additionalEnv", {}).items():
            run_environment[key] = os.environ.get(key, "") + value
        for key in environments.get("clearEnv", {}).items():
            run_environment.pop(key, None)

        logging.debug("Using additional environment %s.", environments)
        return run_environment
598015
def dev():
    """"""
    common_conf()
    env.user = settings.LOGIN_USER_DEV
    env.machine = 'dev'
    env.host_string = settings.HOST_DEV
    env.hosts = [env.host_string, ]
1074509
public void collectVariables(EnvVars env, Run build, TaskListener listener) {
        EnvVars buildParameters = Utils.extractBuildParameters(build, listener);
        if (buildParameters != null) {
            env.putAll(buildParameters);
        }
        addAllWithFilter(envVars, env, filter.getPatternFilter());
        Map<String, String> sysEnv = new HashMap<>();
        Properties systemProperties = System.getProperties();
        Enumeration<?> enumeration = systemProperties.propertyNames();
        while (enumeration.hasMoreElements()) {
            String propertyKey = (String) enumeration.nextElement();
            sysEnv.put(propertyKey, systemProperties.getProperty(propertyKey));
        }
        addAllWithFilter(sysVars, sysEnv, filter.getPatternFilter());
    }
162770
def set_env_from_args(args):
    ''' 
    '''
    args = vars(args)

    if args.get('apiserver_host') is not None:
        config['DX_APISERVER_HOST'] = args['apiserver_host']
    if args.get('apiserver_port') is not None:
        config['DX_APISERVER_PORT'] = args['apiserver_port']
    if args.get('apiserver_protocol') is not None:
        config['DX_APISERVER_PROTOCOL'] = args['apiserver_protocol']
    if args.get('project_context_id') is not None:
        config['DX_PROJECT_CONTEXT_ID'] = args['project_context_id']
    if args.get('workspace_id') is not None:
        config['DX_WORKSPACE_ID'] = args['workspace_id']
    if args.get('cli_wd') is not None:
        config['DX_CLI_WD'] = args['cli_wd']
    if args.get('security_context') is not None:
        config['DX_SECURITY_CONTEXT'] = args['security_context']
    if args.get('auth_token') is not None:
        config['DX_SECURITY_CONTEXT'] = json.dumps({"auth_token": args['auth_token'],
                                                    "auth_token_type": "Bearer"})
1043180
public void setEnvironment(String value) {
    switch (value) {
      case "BROWSER":
        this.environment = CompilerOptions.Environment.BROWSER;
        break;
      case "CUSTOM":
        this.environment = CompilerOptions.Environment.CUSTOM;
        break;
      default:
        throw new BuildException(
            "Unrecognized 'environment' option value (" + value + ")");
    }
  }
143931
def prepare_environment(default_settings=_default_settings, **kwargs):
    # pylint: disable=unused-argument
    '''
    
    '''
    for key, value in default_settings.items():
        os.environ.setdefault(key, value)
    os.environ.update(kwargs)
    if six.PY2:  # nocv
        warnings.warn(
            'Python 2.7 is deprecated and will dropped in 2.0, use Python >3.5',
            DeprecationWarning
        )
529358
public UpdateBranchRequest withEnvironmentVariables(java.util.Map<String, String> environmentVariables) {
        setEnvironmentVariables(environmentVariables);
        return this;
    }
661237
def set_os_environ(variables_mapping):
    
    for variable in variables_mapping:
        os.environ[variable] = variables_mapping[variable]
        logger.log_debug("Set OS environment variable: {}".format(variable))
1230345
def initialize_env(env_file=None, fail_silently=True, load_globally=True):
    
    data = {}
    data.update(os.environ)
    if env_file:
        data.update(read_file_values(env_file, fail_silently))
    
    if load_globally:
        os.environ.update(data)
    
    return Environment(env_dict=data)
39718
def setup_config(command, filename, section, vars):
    """"""
    confuri = "config:" + filename
    if ":" in section:
        confuri += "#" + section.rsplit(":", 1)[-1]
    conf = appconfig(confuri)

    load_environment(conf.global_conf, conf.local_conf)
817373
private Map<String, String> returnEnvironmentVars(AbstractBuild<?, ?> build, TaskListener listener) {
        Map<String, String> envVars = Ghprb.getEnvVars(build, listener);

        if (!envVars.containsKey("ghprbUpstreamStatus")) {
            return null;
        }

        GhprbGitHubAuth auth = GhprbTrigger.getDscp()
                .getGitHubAuth(envVars.get("ghprbCredentialsId"));

        try {
            GitHub gh = auth.getConnection(build.getProject());
            repo = gh.getRepository(envVars.get("ghprbGhRepository"));
            return envVars;
        } catch (Exception e) {
            LOGGER.log(Level.SEVERE, "Unable to connect to GitHub repo", e);
            return null;
        }

    }
502753
public void setNewenvironment(final boolean newenv) {
    this.compilerDef.setNewenvironment(newenv);
    for (int i = 0; i < this._compilers.size(); i++) {
      final CompilerDef currentCompilerDef = this._compilers.elementAt(i);
      currentCompilerDef.setNewenvironment(newenv);
    }
    this.linkerDef.setNewenvironment(newenv);
  }
9635
protected function initEnvironment(): void
    {
        $envFile = $this->getRootRelatedPath($this->getEnvFileName());

        $this->assertFileIsReadable($envFile);

        self::$envIsSet = (bool)(new Dotenv($this->getRootDirectory(), $this->getEnvFileName()))->load();
    }
270047
def setenv(self, variable, value):
    '''
    '''
    os.environ[variable] = value
    os.putenv(variable, value)
    bot.debug('%s set to %s' % (variable, value))
214818
protected function configure()
    {
        $this
        ->setName($this->name)
        ->setDescription($this->description)
        ->setAliases($this->aliases)
        ->addOption(
          'env',
          null,
          InputOption::VALUE_REQUIRED,
          'Set the environment variable file',
          sprintf('%s/%s', getcwd(), '.craftsman')
        );
    }