configure,pyuno: require at least Python 2.7
Nobody needs to use 2.6 any more, so reduce the maintenance burden. https://lists.freedesktop.org/archives/libreoffice/2018-March/079670.html Change-Id: I101e26fbceffbe6119f4a6484530f27760b03eb4 Reviewed-on: https://gerrit.libreoffice.org/50816 Reviewed-by: Michael Stahl <Michael.Stahl@cib.de> Tested-by: Jenkins <ci@libreoffice.org>
This commit is contained in:
parent
41f1a38b9e
commit
aa02205fc4
10
configure.ac
10
configure.ac
@ -8040,14 +8040,14 @@ AC_SUBST(LIBXML_LIBS)
|
|||||||
AC_SUBST(XMLLINT)
|
AC_SUBST(XMLLINT)
|
||||||
|
|
||||||
# =====================================================================
|
# =====================================================================
|
||||||
# Checking for a Python interpreter with version >= 2.6.
|
# Checking for a Python interpreter with version >= 2.7.
|
||||||
# Build and runtime requires Python 3 compatible version (>= 2.6).
|
# Build and runtime requires Python 3 compatible version (>= 2.7).
|
||||||
# Optionally user can pass an option to configure, i. e.
|
# Optionally user can pass an option to configure, i. e.
|
||||||
# ./configure PYTHON=/usr/bin/python
|
# ./configure PYTHON=/usr/bin/python
|
||||||
# =====================================================================
|
# =====================================================================
|
||||||
if test "$build_os" != "cygwin" -a "$enable_python" != fully-internal; then
|
if test "$build_os" != "cygwin" -a "$enable_python" != fully-internal; then
|
||||||
# This allows a lack of system python with no error, we use internal one in that case.
|
# This allows a lack of system python with no error, we use internal one in that case.
|
||||||
AM_PATH_PYTHON([2.6],, [:])
|
AM_PATH_PYTHON([2.7],, [:])
|
||||||
# Clean PYTHON_VERSION checked below if cross-compiling
|
# Clean PYTHON_VERSION checked below if cross-compiling
|
||||||
PYTHON_VERSION=""
|
PYTHON_VERSION=""
|
||||||
if test "$PYTHON" != ":"; then
|
if test "$PYTHON" != ":"; then
|
||||||
@ -8228,11 +8228,11 @@ system)
|
|||||||
#include <Python.h>
|
#include <Python.h>
|
||||||
|
|
||||||
int main(int argc, char **argv) {
|
int main(int argc, char **argv) {
|
||||||
if ((PY_MAJOR_VERSION == 2 && PY_MINOR_VERSION >= 6) ||
|
if ((PY_MAJOR_VERSION == 2 && PY_MINOR_VERSION >= 7) ||
|
||||||
(PY_MAJOR_VERSION == 3 && PY_MINOR_VERSION >= 3)) return 0;
|
(PY_MAJOR_VERSION == 3 && PY_MINOR_VERSION >= 3)) return 0;
|
||||||
else return 1;
|
else return 1;
|
||||||
}
|
}
|
||||||
]])],[AC_MSG_RESULT([ok])],[AC_MSG_ERROR([Python >= 3.3 is needed when building with Python 3, or Python >= 2.6 when building with Python 2])],[AC_MSG_RESULT([skipped; cross-compiling])])
|
]])],[AC_MSG_RESULT([ok])],[AC_MSG_ERROR([Python >= 3.3 is needed when building with Python 3, or Python >= 2.7 when building with Python 2])],[AC_MSG_RESULT([skipped; cross-compiling])])
|
||||||
CFLAGS=$save_CFLAGS
|
CFLAGS=$save_CFLAGS
|
||||||
AC_LANG_POP(C)
|
AC_LANG_POP(C)
|
||||||
|
|
||||||
|
@ -1678,9 +1678,7 @@ static PyTypeObject PyUNOType =
|
|||||||
nullptr,
|
nullptr,
|
||||||
nullptr,
|
nullptr,
|
||||||
nullptr
|
nullptr
|
||||||
#if PY_VERSION_HEX >= 0x02060000
|
|
||||||
, 0
|
, 0
|
||||||
#endif
|
|
||||||
#if PY_VERSION_HEX >= 0x03040000
|
#if PY_VERSION_HEX >= 0x03040000
|
||||||
, nullptr
|
, nullptr
|
||||||
#endif
|
#endif
|
||||||
|
@ -221,9 +221,7 @@ static PyTypeObject PyUNO_callable_Type =
|
|||||||
nullptr,
|
nullptr,
|
||||||
nullptr,
|
nullptr,
|
||||||
nullptr
|
nullptr
|
||||||
#if PY_VERSION_HEX >= 0x02060000
|
|
||||||
, 0
|
, 0
|
||||||
#endif
|
|
||||||
#if PY_VERSION_HEX >= 0x03040000
|
#if PY_VERSION_HEX >= 0x03040000
|
||||||
, nullptr
|
, nullptr
|
||||||
#endif
|
#endif
|
||||||
|
@ -115,9 +115,7 @@ static PyTypeObject RuntimeImpl_Type =
|
|||||||
nullptr,
|
nullptr,
|
||||||
nullptr,
|
nullptr,
|
||||||
nullptr
|
nullptr
|
||||||
#if PY_VERSION_HEX >= 0x02060000
|
|
||||||
, 0
|
, 0
|
||||||
#endif
|
|
||||||
#if PY_VERSION_HEX >= 0x03040000
|
#if PY_VERSION_HEX >= 0x03040000
|
||||||
, nullptr
|
, nullptr
|
||||||
#endif
|
#endif
|
||||||
|
@ -340,9 +340,7 @@ static PyTypeObject PyUNOStructType =
|
|||||||
nullptr,
|
nullptr,
|
||||||
nullptr,
|
nullptr,
|
||||||
nullptr
|
nullptr
|
||||||
#if PY_VERSION_HEX >= 0x02060000
|
|
||||||
, 0
|
, 0
|
||||||
#endif
|
|
||||||
#if PY_VERSION_HEX >= 0x03040000
|
#if PY_VERSION_HEX >= 0x03040000
|
||||||
, nullptr
|
, nullptr
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user