| Files | Last commit | Last update |
|---|---|---|
feat(version): Bump pypto version from 0.2.1 to 0.3.0 Co-authored-by: chengding888<chengding1@hisilicon.com> # message auto-generated for no-merge-commit merge: !7026 merge master into master feat(version): Bump pypto version from 0.2.1 to 0.3.0 Created-by: chengding888 Commit-by: chengding888 Merged-by: cann-robot Description: feat(version): Bump pypto version from 0.2.1 to 0.3.0 The wheel and sdist packages built by python3 build_ci.py --clean --no_isolation currently carry version 0.2.1. Bump the package version to 0.3.0 for the new release, and switch the packaging scripts from hardcoded whl file names to wildcard matching so future releases only need to update pyproject.toml. This mirrors the change already merged on the 9.2.0 branch (cann/pypto!6300). Changes: - Update version in pyproject.toml from 0.2.1 to 0.3.0 - Change the whl file name in scripts/package/module/ascend/PyptoSo.xml to wildcard pypto-*.whl - Change the whl file path in scripts/package/pypto/scripts/pypto_custom_install.sh to dynamic glob matching - Add the 9.2.0 -> 0.3.0 CANN-PyPTO version mapping in docs/zh/install/build_and_install.md - Update the pip show pypto example version in .agents/skills/pypto-simulation/SKILL.md to 0.3.0 Verified with python3 build_ci.py --clean --no_isolation, which produces pypto-0.3.0-cp37-abi3-manylinux2014_aarch64.whl and pypto-0.3.0.tar.gz, and the run package correctly contains the 0.3.0 whl. See merge request: cann/pypto!7026 | 1 month ago | |
fix(build): Add set -e to run package scripts and flatten nested defaults Co-authored-by: chengding888<chengding1@hisilicon.com> # message auto-generated for no-merge-commit merge: !7313 merge fix/package-shell-warnings into master fix(build): Add set -e to run package scripts and flatten nested defaults Created-by: chengding888 Commit-by: chengding888 Merged-by: cann-robot Description: fix(build): Add set -e to run package scripts and flatten nested defaults Fix CodeCheck warnings reported for the PyPTO run package scripts: - Five scripts ( pypto_custom_uninstall.sh, run_pypto_uninstall.sh, run_pypto_install.sh, pypto_func.sh, pypto_custom_install.sh) missed set -e at the script head. - Variable definitions such as PKG_WHL_INSTALL_PATH="${PKG_WHL_INSTALL_PATH:-${PKG_INSTALL_PATH}/python/site-packages}" nested more than two levels; they are rewritten with explicit empty checks while keeping the original semantics. Since pypto_func.sh is sourced by install.sh / uninstall.sh, enabling set -e makes errexit propagate into the entry scripts. To keep the existing error-handling behavior unchanged, every command whose failure was previously ignored is guarded with || true, including: - best-effort chmod / chown / chattr / find calls and grep misses; - installed/package version.info lookups (is_multi_version_pkg, get_version), so that a missing or corrupted version.info no longer aborts install.sh / uninstall.sh silently before the /etc/ascend_install.info fallback logic; - log initialization, which falls back to /dev/null when the log directory is not writable, so installation/uninstallation keeps running as before; - the first-install path (version.info does not exist yet), the legacy /etc/ascend_install.info uninstall path, and the invalid local statement in _set_mode. Changes: - Add set -e to the five run package scripts - Flatten nested variable defaults in pypto_custom_uninstall.sh and run_pypto_uninstall.sh - Guard benign failures, version.info lookups and log initialization in pypto_func.sh, install.sh, uninstall.sh, run_pypto_uninstall.sh and pypto_custom_uninstall.sh - Reset ARCH_NAME to empty when scene.info lookup fails, to avoid capturing the error log into the variable Validation: - bash -n on all touched scripts and git diff --check passed - A/B comparison against the base commit (eb60d7b58) with real CANN common_func*.inc: 36 scenarios (help/version/check/first install/uninstall/custom scripts, invalid arguments, missing or corrupted version.info, unwritable log directory) behave identically; only the redundant stderr lines from failed log-file writes disappear - Unit checks for the set -e sensitive functions Related Issues: #3757 See merge request: cann/pypto!7313 | 27 days ago |