Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Important] DO NOT Support Py3.7 Since Paddle Version 2.6.0 and Forbid in CMake #59680

Merged
merged 4 commits into from
Dec 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -339,6 +339,8 @@ unset(WITH_RECORD_BUILDTIME CACHE)
# PY_VERSION
if(NOT PY_VERSION)
set(PY_VERSION 3.8)
elseif(${PY_VERSION} VERSION_LESS 3.8)
message(FATAL_ERROR "Paddle only support Python version>=3.8 now")
endif()
0x45f marked this conversation as resolved.
Show resolved Hide resolved
set(PYBIND11_PYTHON_VERSION ${PY_VERSION})

Expand Down
6 changes: 3 additions & 3 deletions python/setup.py.in
Original file line number Diff line number Diff line change
Expand Up @@ -527,10 +527,10 @@ packages=['paddle',
with open('@PADDLE_SOURCE_DIR@/python/requirements.txt') as f:
setup_requires = f.read().splitlines()

if sys.version_info < (3,7):
raise RuntimeError("Paddle only support Python version>=3.7 now")
if sys.version_info < (3,8):
raise RuntimeError("Paddle only support Python version>=3.8 now")

if sys.version_info >= (3,7):
if sys.version_info >= (3,8):
setup_requires_tmp = []
for setup_requires_i in setup_requires:
if "<\"3.6\"" in setup_requires_i or "<=\"3.6\"" in setup_requires_i or "<\"3.5\"" in setup_requires_i or "<=\"3.5\"" in setup_requires_i or "<\"3.7\"" in setup_requires_i:
0x45f marked this conversation as resolved.
Show resolved Hide resolved
Expand Down
8 changes: 4 additions & 4 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,9 @@
version = str(version_detail[0]) + '.' + str(version_detail[1])
env_version = str(os.getenv("PY_VERSION"))

if version_detail < (3, 7):
if version_detail < (3, 8):
raise RuntimeError(
f"Paddle only supports Python version >= 3.7 now,"
f"Paddle only supports Python version >= 3.8 now,"
f"you are using Python {python_version}"
)
elif env_version is None:
Expand Down Expand Up @@ -873,7 +873,7 @@ def get_setup_requires():
setup_requires = (
f.read().splitlines()
) # Specify the dependencies to install
if sys.version_info >= (3, 7):
if sys.version_info >= (3, 8):
setup_requires_tmp = []
for setup_requires_i in setup_requires:
if (
Expand All @@ -889,7 +889,7 @@ def get_setup_requires():
return setup_requires
else:
raise RuntimeError(
"please check your python version,Paddle only support Python version>=3.7 now"
"please check your python version,Paddle only support Python version>=3.8 now"
)


Expand Down