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())
评论列表
文章目录