Return proper build parameters.
974654
def get_build_args():
    """"""
    try:
        build_args = package_config()
    except Exception as e:
        if isinstance(e, OSError):
            if e.errno != errno.ENOENT:
                _LOGGER.warn('Failed to run pkg-config: {}'.format(e))
        else:
            _LOGGER.warn('pkg-config failed to find tesseract/lept libraries: {}'.format(e))
        build_args = get_tesseract_version()

    if build_args['cython_compile_time_env']['TESSERACT_VERSION'] >= 0x3050200:
        _LOGGER.debug('tesseract >= 03.05.02 requires c++11 compiler support')
        build_args['extra_compile_args'] = ['-std=c++11', '-DUSE_STD_NAMESPACE']

    _LOGGER.debug('build parameters: {}'.format(build_args))
    return build_args
665636
def _build_netengine_arguments(self):
        
        arguments = {
            "host": self.host
        }

        if self.config is not None:
            for key, value in self.config.iteritems():
                arguments[key] = value

        if self.port:
            arguments["port"] = self.port

        return arguments
1258318
async def builds(self, *args, **kwargs):
        

        return await self._makeApiCall(self.funcinfo["builds"], *args, **kwargs)
118729
def _params(sig):
        """"""
        params = []
        for p in sig.parameters:
            param = sig.parameters[p]
            optional = param.default != inspect.Signature.empty
            default = UIBuilder._safe_default(param.default) if param.default != inspect.Signature.empty else ''
            annotation = param.annotation if param.annotation != inspect.Signature.empty else ''
            type = UIBuilder._guess_type(default)

            # Create the parameter attribute dict
            p_attr = {
                "name": param.name,
                "label": param.name,
                "optional": optional,
                "default": default,
                "description": annotation,
                "hide": False,
                "type": type,
                "kinds": None,
                "choices": [],
                "id": None,
                "events": None
            }

            # Special choices handling for boolean parameters
            if isinstance(default, bool):
                p_attr['choices'] = {
                    'True': 'true',
                    'False': 'false'
                }

            # Append it to the list
            params.append(p_attr)
        return params
1344757
def build(self, build_dir, **kwargs):
        """"""
        # pylint: disable=no-self-use
        del kwargs
        args = ["cmake", "--build", build_dir]
        args.extend(self._get_build_flags())
        return [{"args": args}]
327456
def build(self, output_path=""):
        """"""

        self.output_path = self.checkOutputPath(output_path)
        self._buildStaticFiles()
        self.final_url = self._buildTemplates()
        printDebug("Done.", "comment")
        printDebug("=> %s" % (self.final_url), "comment")
        return self.final_url
832832
def build_number(self):
        """"""
        version_separator = '+'
        if version_separator in self.version:
            # Post product/build version separation
            return self.version.split(version_separator)[2]
        # Pre product/build version separation
        return self.version.split('-')[1]
751177
def build_configuration_parameters(app):
    """"""
    env = Environment(loader=FileSystemLoader("{0}/_data_templates".format(BASEPATH)))
    template_file = env.get_template("configuration-parameters.j2")
    data = {}
    data["schema"] = Config.schema()
    rendered_template = template_file.render(**data)
    output_dir = "{0}/configuration/generated".format(BASEPATH)
    with open("{}/parameters.rst".format(output_dir), "w") as f:
        f.write(rendered_template)
1263568
protected void checkParameters() {
        if (homeDir == null && classpath == null) {
            throw new BuildException("either home attribute or " + "classpath attributes "
                    + " must be defined for task <" + getTaskName() + "/>", getLocation());
        }

        if (pluginList != null) {
            // Make sure that all plugins are actually Jar files.
            String[] pluginFileList = pluginList.list();
            for (String pluginFile : pluginFileList) {
                if (!pluginFile.endsWith(".jar")) {
                    throw new BuildException("plugin file " + pluginFile + " is not a Jar file " + "in task <" + getTaskName()
                    + "/>", getLocation());
                }
            }
        }

        for (SystemProperty systemProperty : systemPropertyList) {
            if (systemProperty.getName() == null || systemProperty.getValue() == null) {
                throw new BuildException("systemProperty elements must have name and value attributes");
            }
        }
    }
1260612
def setup_parameters(self):
        """"""
        t = self.template
        parameters = self.get_parameter_definitions()

        if not parameters:
            logger.debug("No parameters defined.")
            return

        for name, attrs in parameters.items():
            p = build_parameter(name, attrs)
            t.add_parameter(p)
1235200
def build(self, **values: Any) -> str:
        """"""
        converted_values = {
            key: self._converters[key].to_url(value)
            for key, value in values.items()
            if key in self._converters
        }
        result = self._builder.format(**converted_values).split('|', 1)[1]
        query_string = urlencode(
            {
                key: value
                for key, value in values.items()
                if key not in self._converters and key not in self.defaults
            },
            doseq=True,
        )
        if query_string:
            result = "{}?{}".format(result, query_string)
        return result
1110631
protected function buildParams()
    {
        if (empty($this->get)) {
            foreach (@$_GET as $k => $v) {
                $this->get[$k] = $v;
                $this->params[$k] = $v;
            }
        }

        if (empty($this->post)) {
            foreach (@$_POST as $k => $v) {
                $this->post[$k] = $v;
                $this->params[$k] = $v;
            }
        }

        foreach ($this->userParams as $k => $v) {
            $this->params[$k] = $v;
        }
    }
782338
def _system_parameters(**kwargs):
    
    return {key: value for key, value in kwargs.items()
            if (value is not None or value == {})}
987492
def build(self, builder):
        """"""
        params = dict(
            OID=self.oid,
            Active=bool_to_true_false(self.active),
            BypassDuringMigration=bool_to_true_false(self.bypass_during_migration),
            NeedsRetesting=bool_to_true_false(self.needs_retesting),
        )

        if self.variable_oid is not None:
            params["VariableOID"] = self.variable_oid

        if self.field_oid is not None:
            params["FieldOID"] = self.field_oid

        if self.form_oid is not None:
            params["FormOID"] = self.form_oid

        if self.folder_oid is not None:
            params["FolderOID"] = self.folder_oid

        if self.record_position is not None:
            params["RecordPosition"] = str(self.record_position)

        if self.form_repeat_number is not None:
            params["FormRepeatNumber"] = str(self.form_repeat_number)

        if self.folder_repeat_number is not None:
            params["FolderRepeatNumber"] = str(self.folder_repeat_number)

        if self.all_variables_in_folders is not None:
            params["AllVariablesInFolders"] = bool_to_true_false(
                self.all_variables_in_folders
            )

        if self.all_variables_in_fields is not None:
            params["AllVariablesInFields"] = bool_to_true_false(
                self.all_variables_in_fields
            )

        if self.logical_record_position is not None:
            params["LogicalRecordPosition"] = self.logical_record_position.value

        builder.start("mdsol:DerivationDef", params)
        for step in self.derivation_steps:
            step.build(builder)
        builder.end("mdsol:DerivationDef")
1060884
def build(self, builder):
        """"""

        params = dict(OID=self.oid, Name=self.name)

        if self.unit_dictionary_name:
            params["mdsol:UnitDictionaryName"] = self.unit_dictionary_name

        for suffix in ["A", "B", "C", "K"]:
            val = getattr(self, "constant_{0}".format(suffix.lower()))
            params["mdsol:Constant{0}".format(suffix)] = str(val)

        if self.standard_unit:
            params["mdsol:StandardUnit"] = "Yes"

        builder.start("MeasurementUnit", params)
        for child in self.symbols:
            child.build(builder)
        builder.end("MeasurementUnit")
979345
def get_build_flavor(settings_module, args):
    """"""
    known_flavors = listify(call_user_func(settings_module, 'known_flavors'))
    if args.flavor:
        if args.flavor not in known_flavors:
            raise ValueError('Unknown build flavor: {}'.format(args.flavor))
    else:
        args.flavor = call_user_func(settings_module, 'default_flavor')
        if args.flavor and args.flavor not in known_flavors:
            raise ValueError(
                'Unknown default build flavor: {}'.format(args.flavor))
279010
def build_user_requested_parameters(request, meta):
    """"""

    postParameters = {}
    getParameters = {}
    files = {}

    # Add parameters requested by the server
    if 'user_info' in meta:
        for prop in meta['user_info']:

            # Test if the value exist, otherwise return None
            value = None
            if hasattr(request.user, prop) and prop in settings.PIAPI_USERDATA:
                value = getattr(request.user, prop)
            else:
                raise Exception('requested user attribute "%s", '
                                'does not exist or requesting is not allowed' % prop)

            # Add informations to get or post parameters, depending on the current method
            if request.method == 'POST':
                postParameters['ebuio_u_' + prop] = value
            else:
                getParameters['ebuio_u_' + prop] = value

    return (getParameters, postParameters, files)