22 个稳定版本
| 3.5.2 | 2024 年 6 月 3 日 |
|---|---|
| 3.5.0 | 2024 年 4 月 7 日 |
| 3.4.2 | 2023 年 12 月 19 日 |
| 3.4.1 | 2023 年 10 月 18 日 |
| 1.3.0 | 2021 年 9 月 15 日 |
#49 在 配置 中
495KB
11K SLoC
sp-variant - 检测 StorPool 构建系统的 Linux 发行版
sp-variant 库主要用于 StorPool 内部构建和 QA 环境,以及端用户系统安装的第一步。它检查几个文件,并尝试确定正在运行的是哪个发行版及其版本。
基本命令行使用
sp_variant detect- 识别当前 Linux 发行版sp_variant show current- 显示当前发行版的 JSON 数据sp_variant show all- 显示所有支持的发行版的 JSON 数据sp_variant show NAME- 显示特定发行版的 JSON 数据sp_variant command list- 显示特定发行版的命令列表sp_variant command run category.item [arg...]- 运行特定发行版的命令sp_variant repo add- 添加 StorPool 软件包仓库的 Apt 或 Yum 仓库定义
基本 Python API
sp_variant.variant 模块导出多个常量和函数,其中包括
detect_variant()- 返回描述检测到的发行版的对象get_variant()- 获取描述指定发行版的对象get_by_alias()- 相同,但指定发行版的 StorPool 构建器别名get_all_variants()- 获取描述所有支持的发行版的对象command_run()- 执行特定分布的命令
基本的Rust API
sp-variant 包导出了一些常量和函数,其中包括
build_variants()- 返回所有支持变体的信息detect()- 获取描述检测到的分布的对象get_from()- 获取描述指定分布的对象get_by_alias_from()- 同上,但指定分布的StorPool构建器别名
如需更多信息,以及建议和问题报告,请联系StorPool支持团队。
依赖关系
~7–17MB
~241K SLoC