| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
feat(build): Support packing whl into run Co-authored-by: DCGDDD<yangxu14@huawei.com> # message auto-generated for no-merge-commit merge: !4267 merge master into master feat(build): Support packing whl into run Created-by: DCGDDD Commit-by: DCGDDD Merged-by: cann-robot Description: ## 变更摘要 此 PR 为 PyPTO 项目新增了将 Python wheel ( .whl) 包打入 CANN .run 安装包的能力。通过引入 ENABLE_FEATURE_PACKING_WHL_INTO_RUN 特性开关,将构建产物(whl 包及脚本)整合到 CANN 标准的 run 包交付流程中,使 whl 包能随 run 包一起分发和安装。整体改动涵盖 CMake 构建体系扩展、安装/卸载脚本框架搭建、包描述 XML 配置以及 CI 构建入口适配。 ## 主要改动 - **新增 CMake 打包基础设施**:新增 cmake/package.cmake(安装 whl 及脚本到 run 包目录结构)、cmake/prepare.cmake(第三方路径初始化)、cmake/fetch_cann_cmake.cmake(自动下载 CANN 公共 cmake 脚本)、version.cmake(版本声明 9.1.0),均在 ENABLE_FEATURE_PACKING_WHL_INTO_RUN 开关控制下生效;cmake/config.cmake 中移除了部分不再需要的配置(-17 行)。 - **新增 run 包安装/卸载脚本体系**:在 scripts/package/pypto/scripts/ 下新增 10 个 Shell 脚本,包括 install.sh(安装入口)、uninstall.sh(卸载入口)、run_pypto_install.sh(文件拷贝调度及 whl 的 pip install 后处理)、run_pypto_uninstall.sh(卸载流程)、pypto_custom_install.sh/pypto_custom_uninstall.sh(自定义安装/卸载逻辑)、pypto_func.sh(公共函数库,492 行)、ver_check.sh(版本校验)、cleanup.sh 和 help.info,构成了完整的 run 包生命周期管理。 - **新增包描述 XML 配置**:新增 scripts/package/pypto/pypto.xml 作为 run 包的主配置文件(定义包名 pypto、安装脚本路径、版本信息、目录结构等),并在 scripts/package/module/ascend/ 下新增 5 个模块级 XML(EngineeringCommon.xml、EngineeringFiles.xml、PyptoBin.xml、PyptoInc.xml、PyptoSo.xml),用于描述不同子模块的安装路径和权限。 - **CI 构建入口 build_ci.py 适配**:大幅扩展 build_ci.py(+80/-32),使其支持打包 whl 到 run 包的新构建模式,整合新的 CMake 流程和参数配置。 See merge request: cann/pypto!4267 | 5 个月前 | |
feat(build): Support RPM/DEB packaging in unified build scenarios. Co-authored-by: wangmingjun<wangmingjun13@huawei.com> # message auto-generated for no-merge-commit merge: !5277 merge feat/build-pkg-type-rpm-deb into master feat(build): Support RPM/DEB packaging in unified build scenarios. Created-by: hwwangmingjun Commit-by: wangmingjun Merged-by: cann-robot Description: feat(build): 支持统一构建场景下的 rpm/deb 打包 为支持 CANN 全量源码构建场景,新增 PACKAGE_TYPE CMake 选项与 --pkg-type 命令行参数,支持产出 run/rpm/deb/all 多种安装包格式。RPM/DEB 包通过自定义 postinst/prerm 钩子完成 PyPTO wheel 的安装与卸载,并统一安装包元数据文件权限。 主要改动: - CMakeLists.txt 新增 PACKAGE_TYPE 缓存变量,并透传至 set_cann_cpack_config - build_ci.py 新增 --pkg-type 参数(run/rpm/deb/all),并传递给 CMake - 新增 rpm_deb/custom_postinst.sh,在 RPM/DEB 安装时安装 PyPTO wheel - 新增 rpm_deb/custom_prerm.sh,在 RPM/DEB 卸载时卸载 PyPTO wheel - 修正 scripts/package/pypto/pypto.xml 中 install_mod 权限配置 Related Issues: #2573 See merge request: cann/pypto!5277 | 3 个月前 |