canonical/cos-lib

add helper for discovering and aliasing system architecture

开放

#29 创建于 2024年6月17日

 (0 条评论) (0 个反应) (0 位负责人)Python (6 个派生)auto 404
good first issue

仓库指标

星标
 (0 个星标)
PR 合并指标
 (PR 指标待抓取)

描述

Several of our charms do something like this for architecture discovery:

        arch = platform.processor()
        if arch in ["x86_64", "amd64"]:
            self._arch = "amd64"
        elif arch in ["aarch64", "arm64", "armv8b", "armv8l"]:
            self._arch = "arm64"
        else:
            self._arch = arch

Examples (note that they don't all map to the same final arch alias names):

We should decide on one common method and include it here as a helper.

References:

贡献者指南