【Hackathon 10th Spring No.52】add support for Python 3.14 in setup and CI scripts - part 1#79082
Conversation
|
你的PR提交成功,感谢你对开源项目的贡献! |
There was a problem hiding this comment.
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.pyand the generatedpython/setup.py.in. - Extend CI/build scripts to handle the
cp314-cp314ABI (environment setup, pip installs, CMake Python flags/exports). - Include Python 3.14 in the
cicheck_sotmulti-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.
| 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" |
| exit 1 | ||
| fi | ||
| elif [ "$1" == "cp314-cp314" ]; then | ||
| if [ -d "/Library/Frameworks/Python.framework/Versions/3.14" ]; then |
| 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" |
| 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 |
| 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 |
| else | ||
| exit 1 | ||
| fi | ||
| elif [ "$1" == "cp314-cp314" ]; then |
There was a problem hiding this comment.
咋全是 tab,是不是可以单独提个 PR 给 pre-commit 加一个 Tabs remover (Shell)
There was a problem hiding this comment.
咋全是 tab,是不是可以单独提个 PR 给 pre-commit 加一个
Tabs remover (Shell)
@ShigureNyako 喵子!提个 PR 搞一下?
There was a problem hiding this comment.
已单独提 PR:#79104
改动是为 .sh 文件新增 pre-commit Tabs remover (Shell) 规则,验证情况已写在 PR 里。

PR Category
User Experience
PR Types
New features
Description
TODO:
是否引起精度变化
否