setup.py 文件源码

python
阅读 22 收藏 0 点赞 0 评论 0

项目:pyasp 作者: sthiele 项目源码 文件源码
def binaries_urls(platform_name, arch):
    """Return tuple of binaries name and URL, based on given sys informations.

    If detected system is not supported, an empty iterable is returned.
    Architecture and platforms supported depends of distant binary repository.

    """
    try:
        subpath = BASE_URL_PLATFORM_SPECIFIC_SUBPATHS[platform_name, arch]
    except KeyError:
        logging.getLogger().error(
            'clasp/gringo3/gringo4 binaries are not available for'
            ' platform ' + platform_name + ' under architecture '
            + arch + 'bits.')
        return tuple()  # empty iterable
    # no error: build the tuple of binaries paths
    return tuple((local_name, BINARIES_BASE_URL.format(subpath, remote_name))
                 for remote_name, local_name in BINARIES_NAME.items())
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号