[fix]: 修复setuptools包兼容性问题
Co-authored-by: thickhair<zp2165064878@163.com> # message auto-generated for no-merge-commit merge: !47385 merge pyproject_master into master [fix]: 修复setuptools包兼容性问题 Created-by: thickhair Commit-by: thickhair Merged-by: ascend-robot Description: <!-- PR描述模板更新日期:20260203 --> # 【合入来源】 > <font color="red">**如有社区issue,请关联issue链接**</font>\ > <font color="red">**请勿携带内部流程信息(需求链接、问题单、内部issue等)**</font> - [ ] 需求 - [ ] 问题单 - [x] issue/工单 https://gitcode.com/Ascend/pytorch/issues/4371 - [ ] 重构优化 - [ ] 资料更新 # 【修改方案】 【根因】:pyproject.toml 里的 [project] 块是对齐上游 PyTorch的,参考没有配套的 [tool.setuptools.dynamic] 表导致的。而 setup.py 早已把所有元数据(version、description、long_description、license、classifiers、entry_points、install_requires)显式传给了 setup(),所以这个 dynamic 声明是多余的。 【修复】:删掉了整个 [project] 块(共 15 行),让构建回归纯 setup.py 驱动——这正是本仓库的实际情况,也彻底绕开了 PEP 621 对 version/dynamic 的校验,对任何 setuptools 版本都稳定。 # 【资料变更】 不涉及 # 【接口变更】 不涉及 # 【功能验证】 测试已验证 # 【CheckList】 > PR提交人对以下CheckList自检项进行全量自检,自检通过或不涉及,均修改 [ ] 为 [x] - [x] 代码注释完备,正确记录错误日志 - [x] 代码实现进行了返回值、空指针等校验 - [x] PR标题正确使用类型标签,如:feat、fix、refactor、docs、test等 - [x] PR持续集成流水线(CI)执行通过,代码检查无异常 See merge request: Ascend/pytorch!47385
This commit is contained in:
@@ -1,18 +1,3 @@
|
||||
# Package ######################################################################
|
||||
|
||||
[project]
|
||||
name = "torch_npu"
|
||||
dynamic = [
|
||||
"classifiers",
|
||||
"entry-points",
|
||||
"dependencies",
|
||||
"scripts",
|
||||
"version",
|
||||
"description",
|
||||
"readme",
|
||||
"license",
|
||||
]
|
||||
|
||||
# Linter tools #################################################################
|
||||
|
||||
[tool.isort]
|
||||
|
||||
Reference in New Issue
Block a user