Skip to content

Conversation

@gouzil
Copy link
Member

@gouzil gouzil commented Jan 7, 2026

PR Category

User Experience

PR Types

Devs

Description

PY_VERSION 是通过 -DPY_VERSION 传递的,当填写为 3.11.14、不填写 -DPY_VERSION 或者任何有第三位版本号的值,都会出现编译错误

Copilot AI review requested due to automatic review settings January 7, 2026 14:55
@paddle-bot
Copy link

paddle-bot bot commented Jan 7, 2026

你的PR提交成功,感谢你对开源项目的贡献!
请关注后续CI自动化测试结果,详情请参考Paddle-CI手册
Your PR has been submitted. Thanks for your contribution!
Please wait for the result of CI firstly. See Paddle CI Manual for details.

@paddle-bot paddle-bot bot added the contributor External developers label Jan 7, 2026
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes a build error that occurs when PY_VERSION includes a patch version number (e.g., 3.11.14) by updating the version comparison logic in CMakeLists.txt.

Key Changes:

  • Replaced exact version matching (VERSION_EQUAL) with range-based matching using VERSION_GREATER_EQUAL and VERSION_LESS
  • Applied this fix consistently across all four Python version checks (3.11, 3.12, 3.13, and 3.14)

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@SigureMo SigureMo changed the title [SOT] fix cpython internals build python version check error [SOT] Fix PY_VERSION CMake checks for patch versions (e.g., 3.11.14) Jan 7, 2026
@SigureMo SigureMo changed the title [SOT] Fix PY_VERSION CMake checks for patch versions (e.g., 3.11.14) [SOT] Fix PY_VERSION CMake checks for patch versions Jan 7, 2026
@SigureMo SigureMo changed the title [SOT] Fix PY_VERSION CMake checks for patch versions [SOT] Fix cpython_internals source selection Jan 7, 2026
Copy link
Member

@SigureMo SigureMo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTMeow 🐾

@SigureMo SigureMo merged commit d6f970c into PaddlePaddle:develop Jan 7, 2026
68 of 69 checks passed
@SigureMo SigureMo deleted the sot/fix_PY_VERSION_check branch January 7, 2026 19:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

contributor External developers

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants