PyAPI: drop support for Python 3.10
All platforms have been updated to support 3.11 so supporting 3.10 is no longer needed.
This commit is contained in:
parent
f11ec3eb14
commit
5afd33d129
|
@ -1234,10 +1234,10 @@ if(WITH_PYTHON)
|
||||||
# Do this before main 'platform_*' checks,
|
# Do this before main 'platform_*' checks,
|
||||||
# because UNIX will search for the old Python paths which may not exist.
|
# because UNIX will search for the old Python paths which may not exist.
|
||||||
# giving errors about missing paths before this case is met.
|
# giving errors about missing paths before this case is met.
|
||||||
if(DEFINED PYTHON_VERSION AND "${PYTHON_VERSION}" VERSION_LESS "3.10")
|
if(DEFINED PYTHON_VERSION AND "${PYTHON_VERSION}" VERSION_LESS "3.11")
|
||||||
message(
|
message(
|
||||||
FATAL_ERROR
|
FATAL_ERROR
|
||||||
"At least Python 3.10 is required to build, but found Python ${PYTHON_VERSION}"
|
"At least Python 3.11 is required to build, but found Python ${PYTHON_VERSION}"
|
||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|
|
@ -223,9 +223,6 @@ ifeq (, $(wildcard $(LIBDIR)/python/lib/python$(PY_LIB_VERSION)))
|
||||||
PY_LIB_VERSION:=3.12
|
PY_LIB_VERSION:=3.12
|
||||||
ifeq (, $(wildcard $(LIBDIR)/python/lib/python$(PY_LIB_VERSION)))
|
ifeq (, $(wildcard $(LIBDIR)/python/lib/python$(PY_LIB_VERSION)))
|
||||||
PY_LIB_VERSION:=3.11
|
PY_LIB_VERSION:=3.11
|
||||||
ifeq (, $(wildcard $(LIBDIR)/python/lib/python$(PY_LIB_VERSION)))
|
|
||||||
PY_LIB_VERSION:=3.10
|
|
||||||
endif
|
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
|
@ -555,11 +555,15 @@ endif()
|
||||||
|
|
||||||
set(_PYTHON_VERSION "3.11")
|
set(_PYTHON_VERSION "3.11")
|
||||||
string(REPLACE "." "" _PYTHON_VERSION_NO_DOTS ${_PYTHON_VERSION})
|
string(REPLACE "." "" _PYTHON_VERSION_NO_DOTS ${_PYTHON_VERSION})
|
||||||
if(NOT EXISTS ${LIBDIR}/python/${_PYTHON_VERSION_NO_DOTS})
|
|
||||||
set(_PYTHON_VERSION "3.10")
|
# Enable for a short time when bumping to the next Python version.
|
||||||
string(REPLACE "." "" _PYTHON_VERSION_NO_DOTS ${_PYTHON_VERSION})
|
if(FALSE)
|
||||||
if(NOT EXISTS ${LIBDIR}/python/${_PYTHON_VERSION_NO_DOTS})
|
if(NOT EXISTS ${LIBDIR}/python/${_PYTHON_VERSION_NO_DOTS})
|
||||||
message(FATAL_ERROR "Missing python libraries! Neither 3.11 nor 3.10 are found in ${LIBDIR}/python")
|
set(_PYTHON_VERSION "3.12")
|
||||||
|
string(REPLACE "." "" _PYTHON_VERSION_NO_DOTS ${_PYTHON_VERSION})
|
||||||
|
if(NOT EXISTS ${LIBDIR}/python/${_PYTHON_VERSION_NO_DOTS})
|
||||||
|
message(FATAL_ERROR "Missing python libraries! Neither 3.12 nor 3.11 are found in ${LIBDIR}/python")
|
||||||
|
endif()
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|
|
@ -10,8 +10,8 @@
|
||||||
|
|
||||||
#include <Python.h>
|
#include <Python.h>
|
||||||
|
|
||||||
#if PY_VERSION_HEX < 0x030a0000
|
#if PY_VERSION_HEX < 0x030b0000
|
||||||
# error "Python 3.10 or greater is required, you'll need to update your Python."
|
# error "Python 3.11 or greater is required, you'll need to update your Python."
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
|
|
Loading…
Reference in New Issue