[Cherry-Pick][Feature]distinguish whl version(#7204)#7223
Conversation
|
Thanks for your contribution! |
* [Feature]whl version * [Feature]whl version,set root_is_pure = false * [Feature]code style
1239bcd to
aa22463
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## release/2.5 #7223 +/- ##
==============================================
Coverage ? 68.83%
==============================================
Files ? 390
Lines ? 54360
Branches ? 8570
==============================================
Hits ? 37421
Misses ? 14233
Partials ? 2706
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
2d6fa35
into
PaddlePaddle:release/2.5
fastdeploy-bot
left a comment
There was a problem hiding this comment.
🤖 AI Code Review | 2026-04-08
📋 Review 摘要
PR 概述:修改 wheel 打包配置,从生成纯 Python 包 (py3-none-any) 改为平台相关包(动态获取 Python/ABI/Platform 标签)
变更范围:setup.py
影响面 Tag:[CI]
PR 规范检查
- ✅ 标题包含有效 Tag:
[Cherry-Pick][Feature] - ✅ Cherry-pick PR 已注明原 PR 链接 (#7204)
发现的问题
| 级别 | 文件 | 概述 |
|---|---|---|
| 🟡 建议 | setup.py:26 |
新增的 packaging 依赖未显式声明为构建时依赖 |
总体评价
此变更将 wheel 从纯 Python 包改为平台相关包,使包名能够区分不同的 Python 版本和平台,这是合理且必要的改进。代码实现简洁正确,但建议显式声明构建时依赖以确保构建环境的一致性。
| from pathlib import Path | ||
|
|
||
| import paddle | ||
| from packaging import tags |
There was a problem hiding this comment.
🟡 建议 新增的 packaging 依赖未显式声明为构建时依赖。
setup.py 中新增了 from packaging import tags 导入,但 packaging 未在以下位置声明:
pyproject.toml的build-system.requiressetup()的setup_requires参数
虽然 packaging 通常随 pip/setuptools 一起安装,但作为构建时依赖,建议显式声明以确保构建环境的一致性。
建议修复方式:
在 pyproject.toml 中添加构建系统配置:
[build-system]
requires = ["setuptools>=45", "packaging>=21.0"]
build-backend = "setuptools.build_meta"
Cherry-pick of #7204 (authored by @ChowMingSing) to
release/2.5.devPR:#7204
Motivation
rename whl
Modifications
Usage or Command
Accuracy Tests
Checklist
[FDConfig],[APIServer],[Engine],[Scheduler],[PD Disaggregation],[Executor],[Graph Optimization],[Speculative Decoding],[RL],[Models],[Quantization],[Loader],[OP],[KVCache],[DataProcessor],[BugFix],[Docs],[CI],[Optimization],[Feature],[Benchmark],[Others],[XPU],[HPU],[GCU],[DCU],[Iluvatar],[Metax]]pre-commitbefore commit.releasebranch, make sure the PR has been submitted to thedevelopbranch, then cherry-pick it to thereleasebranch with the[Cherry-Pick]PR tag.