示例#1
0
def _installpkgs(args, **kwargs):
    '''
    Runs the R script that does package/installation and testing.
    If we are running in a binary graalvm environment, which is indicated
    by the GRAALVM_FASTR environment variable, we can't use mx to invoke
    FastR, but instead have to invoke the command directly.
    '''
    script = _installpkgs_script()
    if _graalvm() is None:
        return mx_fastr.rscript([script] + args, **kwargs)
    else:
        return mx.run([_graalvm_rscript(), script] + args, **kwargs)
示例#2
0
def _installpkgs(args, **kwargs):
    '''
    Runs the R script that does package/installation and testing.
    If we are running in a binary graalvm environment, which is indicated
    by the GRAALVM_FASTR environment variable, we can't use mx to invoke
    FastR, but instead have to invoke the command directly.
    '''
    script = _installpkgs_script()
    if _graalvm() is None:
        return mx_fastr.rscript([script] + args, **kwargs)
    else:
        return mx.run([_graalvm_rscript(), script] + args, **kwargs)
示例#3
0
def _installpkgs(args, **kwargs):
    '''
    Runs the R script that does package/installation and testing.
    If we are running in a binary graalvm environment, which is indicated
    by the FASTR_GRAALVM environment variable, we can't use mx to invoke
    FastR, but instead have to invoke the command directly.
    '''
    if kwargs.has_key('env'):
        env = kwargs['env']
    else:
        env = os.environ.copy()
        kwargs['env'] = env

    script = _installpkgs_script()
    if _graalvm() is None:
        _ensure_R_on_PATH(env, join(_fastr_suite_dir(), 'bin'))
        return mx_fastr.rscript([script] + args, **kwargs)
    else:
        _ensure_R_on_PATH(env, os.path.dirname(_graalvm_rscript()))
        return mx.run([_graalvm_rscript(), script] + args, **kwargs)