Skip to content

【Hackathon 10th Spring No.52】add support for Python 3.14 in setup and CI scripts - part 1#79082

Merged
swgu98 merged 2 commits into
PaddlePaddle:developfrom
gouzil:ci/support_py314
May 22, 2026
Merged

【Hackathon 10th Spring No.52】add support for Python 3.14 in setup and CI scripts - part 1#79082
swgu98 merged 2 commits into
PaddlePaddle:developfrom
gouzil:ci/support_py314

Conversation

@gouzil
Copy link
Copy Markdown
Member

@gouzil gouzil commented May 21, 2026

PR Category

User Experience

PR Types

New features

Description

  • 在 ci 相关脚本中添加 py314 (同时补充了一些 3.13 遗漏的)

TODO:

  • pybind11 更新到 3
  • gast 检查一下要不要更新

是否引起精度变化

Copilot AI review requested due to automatic review settings May 21, 2026 05:34
@paddle-bot
Copy link
Copy Markdown

paddle-bot Bot commented May 21, 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 May 21, 2026
Copy link
Copy Markdown
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 updates Paddle’s packaging metadata and CI/build shell scripts to recognize and run against Python 3.14, aligning build/test flows with the newly supported interpreter version.

Changes:

  • Add Python 3.14 to package classifiers in both setup.py and the generated python/setup.py.in.
  • Extend CI/build scripts to handle the cp314-cp314 ABI (environment setup, pip installs, CMake Python flags/exports).
  • Include Python 3.14 in the cicheck_sot multi-version loop.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
setup.py Adds Python 3.14 Trove classifier.
python/setup.py.in Adds Python 3.14 Trove classifier for generated setup.
paddle/scripts/paddle_build.sh Adds cp314-cp314 handling in build/setup flows and includes 3.14 in SOT checks.
ci/utils.sh Adds cp314-cp314 handling in CI CMake environment setup.
ci/run_setup.sh Adds cp313/cp314 setup handling (macOS + Linux CI paths).
ci/run_mac_test.sh Adds uninstall/install/env setup support for cp313 and cp314 on macOS CI.

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

Comment on lines +155 to +160
export LD_LIBRARY_PATH=/Library/Frameworks/Python.framework/Versions/3.14/lib/
export DYLD_LIBRARY_PATH=${DYLD_LIBRARY_PATH}:/Library/Frameworks/Python.framework/Versions/3.14/lib/
export PATH=/Library/Frameworks/Python.framework/Versions/3.14/bin/:${PATH}
PYTHON_FLAGS="-DPYTHON_EXECUTABLE:FILEPATH=/Library/Frameworks/Python.framework/Versions/3.14/bin/python3
-DPYTHON_INCLUDE_DIR:PATH=/Library/Frameworks/Python.framework/Versions/3.14/include/python3.14/
-DPYTHON_LIBRARY:FILEPATH=/Library/Frameworks/Python.framework/Versions/3.14/lib/libpython3.14.dylib"
Comment on lines 151 to +154
exit 1
fi
elif [ "$1" == "cp314-cp314" ]; then
if [ -d "/Library/Frameworks/Python.framework/Versions/3.14" ]; then
Comment thread ci/utils.sh
Comment on lines +361 to +367
if [ -d "/Library/Frameworks/Python.framework/Versions/3.14" ]; then
export LD_LIBRARY_PATH=/Library/Frameworks/Python.framework/Versions/3.14/lib/
export DYLD_LIBRARY_PATH=${DYLD_LIBRARY_PATH}:/Library/Frameworks/Python.framework/Versions/3.14/lib/
export PATH=/Library/Frameworks/Python.framework/Versions/3.14/bin/:${PATH}
PYTHON_FLAGS="-DPYTHON_EXECUTABLE:FILEPATH=/Library/Frameworks/Python.framework/Versions/3.14/bin/python3
-DPYTHON_INCLUDE_DIR:PATH=/Library/Frameworks/Python.framework/Versions/3.14/include/python3.14/
-DPYTHON_LIBRARY:FILEPATH=/Library/Frameworks/Python.framework/Versions/3.14/lib/libpython3.14.dylib"
Comment thread ci/run_setup.sh
Comment on lines +147 to +154
export LD_LIBRARY_PATH=/Library/Frameworks/Python.framework/Versions/3.14/lib/
export DYLD_LIBRARY_PATH=${DYLD_LIBRARY_PATH}:/Library/Frameworks/Python.framework/Versions/3.14/lib/
export PATH=/Library/Frameworks/Python.framework/Versions/3.14/bin/:${PATH}
#after changing "PYTHON_LIBRARY:FILEPATH" to "PYTHON_LIBRARY" ,we can use export
export PYTHON_EXECUTABLE=/Library/Frameworks/Python.framework/Versions/3.14/bin/python3
export PYTHON_INCLUDE_DIR=/Library/Frameworks/Python.framework/Versions/3.14/include/python3.14/
export PYTHON_LIBRARY=/Library/Frameworks/Python.framework/Versions/3.14/lib/libpython3.14.dylib
pip3.14 install --user -r ${PADDLE_ROOT}/python/requirements.txt
Comment thread ci/run_mac_test.sh
Comment on lines +148 to +156
if [ -d "/Library/Frameworks/Python.framework/Versions/3.14" ]; then
export LD_LIBRARY_PATH=/Library/Frameworks/Python.framework/Versions/3.14/lib/
export DYLD_LIBRARY_PATH=${DYLD_LIBRARY_PATH}:/Library/Frameworks/Python.framework/Versions/3.14/lib/
export PATH=/Library/Frameworks/Python.framework/Versions/3.14/bin/:${PATH}
#after changing "PYTHON_LIBRARY:FILEPATH" to "PYTHON_LIBRARY" ,we can use export
export PYTHON_EXECUTABLE=/Library/Frameworks/Python.framework/Versions/3.14/bin/python3
export PYTHON_INCLUDE_DIR=/Library/Frameworks/Python.framework/Versions/3.14/include/python3.14/
export PYTHON_LIBRARY=/Library/Frameworks/Python.framework/Versions/3.14/lib/libpython3.14.dylib
pip3.14 install --user -r ${PADDLE_ROOT}/python/requirements.txt
Comment thread ci/run_mac_test.sh
else
exit 1
fi
elif [ "$1" == "cp314-cp314" ]; then
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

咋全是 tab,是不是可以单独提个 PR 给 pre-commit 加一个 Tabs remover (Shell)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

这都能看出来

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

挺明显的
Image

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

咋全是 tab,是不是可以单独提个 PR 给 pre-commit 加一个 Tabs remover (Shell)

@ShigureNyako 喵子!提个 PR 搞一下?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@ShigureNyako 喵子?看看这里!

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

已单独提 PR:#79104

改动是为 .sh 文件新增 pre-commit Tabs remover (Shell) 规则,验证情况已写在 PR 里。

@swgu98 swgu98 merged commit a754a90 into PaddlePaddle:develop May 22, 2026
86 of 88 checks passed
@SigureMo SigureMo deleted the ci/support_py314 branch May 22, 2026 03:37
@gouzil gouzil changed the title [CI] add support for Python 3.14 in setup and CI scripts 【Hackathon 10th Spring No.52】add support for Python 3.14 in setup and CI scripts - part 1 May 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants