Exemple #1
0
def jarname(version, suffix):
    """Determines the name of an OG-Maths Jar."""
    if suffix is None:
        suffix = ''
    else:
        suffix = '-%s' % suffix
    return 'jars/og-maths-%s-%s%s.jar' % (platform_code(), version, suffix)
Exemple #2
0
def jarname(version, suffix):
    """Determines the name of an OG-Maths Jar."""
    if suffix is None:
        suffix = ''
    else:
        suffix = '-%s' % suffix
    return 'jars/og-maths-%s-%s%s.jar' % (platform_code(), version, suffix)
Exemple #3
0
def get_subprojects(lapack_verinfo_file):
    """Returns a list of verinfo data for the OG-Maths subprojects. At the
    moment, the only OG-Maths subproject is OG-Lapack."""
    with open(lapack_verinfo_file, 'r') as f:
        lapack_verinfo = load(f, Loader=Loader)
    if len(lapack_verinfo['platforms']) != 1 or lapack_verinfo['platforms'][0] != platform_code():
        raise RuntimeError('OG-Lapack platform mismatch')
    return [lapack_verinfo]
Exemple #4
0
def get_subprojects(*args):
    """Returns a list of verinfo data for the OG-Maths subprojects."""
    ret = list()
    for val in args:
        with open(val, "r") as f:
            verinfo = load(f, Loader=Loader)
        if len(verinfo["platforms"]) != 1 or verinfo["platforms"][0] != platform_code():
            raise RuntimeError("OG subproject platform mismatch, for project %s." % val)
        ret.append(verinfo)
    return ret
Exemple #5
0
def get_subprojects(*args):
    """Returns a list of verinfo data for the OG-Maths subprojects."""
    ret = list()
    for val in args:
        with open(val, 'r') as f:
            verinfo = load(f, Loader=Loader)
        if len(verinfo['platforms']
               ) != 1 or verinfo['platforms'][0] != platform_code():
            raise RuntimeError(
                'OG subproject platform mismatch, for project %s.' % val)
        ret.append(verinfo)
    return ret
Exemple #6
0
def main(args):
    gcc_lib_folder = get_lib_folder(args)
    print "GCC libraries are at %s" % gcc_lib_folder
    p = platform_code()
    for lib in libs[p]:
        src = os.path.join(gcc_lib_folder, lib)
        dest = os.path.join(args.output, lib)
        print "Copying %s to %s" % (src, dest)
        shutil.copyfile(src, dest)
    if p == 'lnx':
        fix_linux_linkage(args)
    elif p == 'osx':
        fix_osx_linkage(args)
Exemple #7
0
def main(args):
    gcc_lib_folder = get_lib_folder(args)
    print "GCC libraries are at %s" % gcc_lib_folder
    p = platform_code()
    for lib in libs[p]:
        src = os.path.join(gcc_lib_folder, lib)
        dest = os.path.join(args.output, lib)
        print "Copying %s to %s" % (src, dest)
        shutil.copyfile(src, dest)
    if p == 'lnx':
        fix_linux_linkage(args)
    elif p == 'osx':
        fix_osx_linkage(args)
Exemple #8
0
def generate_verinfo(project, version, revision, lapack_verinfo_file, buildnumber):
    """Generates a dict containing the verinfo for this build, incorporating
    the values passed in its parameters."""
    artifacts = [ jarname (version, jar) for jar in jars ]
    subprojects = get_subprojects(lapack_verinfo_file)
    try:
        buildnumber = int(buildnumber)
    except ValueError:
        pass
    d = { 'project': 'OG-Maths', 'revision': revision, 'version': version, \
          'platforms': [platform_code()], 'artifacts': artifacts,
          'subprojects': subprojects, 'buildnumber': buildnumber,
          'localtime': time.strftime('%Y/%m/%d %H:%M:%S'),
          'timestamp': time.time() }
    return d
Exemple #9
0
def generate_verinfo(project, version, revision, lapack_verinfo_file,
                     izy_verinfo_file, buildnumber):
    """Generates a dict containing the verinfo for this build, incorporating
    the values passed in its parameters."""
    artifacts = [jarname(version, jar) for jar in jars]
    subprojects = get_subprojects(lapack_verinfo_file, izy_verinfo_file)
    try:
        buildnumber = int(buildnumber)
    except ValueError:
        pass
    d = { 'project': 'OG-Maths', 'revision': revision, 'version': version, \
          'platforms': [platform_code()], 'artifacts': artifacts,
          'subprojects': subprojects, 'buildnumber': buildnumber,
          'localtime': time.strftime('%Y/%m/%d %H:%M:%S'),
          'timestamp': time.time() }
    return d
Exemple #10
0
def generate_verinfo(project, version, revision, lapack_verinfo_file, izy_verinfo_file, buildnumber):
    """Generates a dict containing the verinfo for this build, incorporating
    the values passed in its parameters."""
    artifacts = [jarname(version, jar) for jar in jars]
    subprojects = get_subprojects(lapack_verinfo_file, izy_verinfo_file)
    try:
        buildnumber = int(buildnumber)
    except ValueError:
        pass
    d = {
        "project": "OG-Maths",
        "revision": revision,
        "version": version,
        "platforms": [platform_code()],
        "artifacts": artifacts,
        "subprojects": subprojects,
        "buildnumber": buildnumber,
        "localtime": time.strftime("%Y/%m/%d %H:%M:%S"),
        "timestamp": time.time(),
    }
    return d
Exemple #11
0
def get_lib_folder(args):
    p = platform_code()
    return args.lib_location or os.environ.get('GCC_LIB_FOLDER') or default_gcc_lib_folder[p]
Exemple #12
0
def get_lib_folder(args):
    p = platform_code()
    return args.lib_location or os.environ.get(
        'GCC_LIB_FOLDER') or default_gcc_lib_folder[p]