diff options
author | Michael Stahl <Michael.Stahl@cib.de> | 2020-04-04 20:01:17 +0200 |
---|---|---|
committer | Michael Stahl <michael.stahl@cib.de> | 2020-04-09 16:43:34 +0200 |
commit | c4fa6efa67775a6b333a4a5aa873b5cc24a4f7bc (patch) | |
tree | d8977f4c2c97287865a2407b25c0327c49bbe17c /configure.ac | |
parent | 2d64651e889e55f63c90ded24e63e17eaf52102f (diff) |
pyuno,*: kill Python 2 support with fire
Python 2 support was retained for use with --enable-python=system
on RHEL7 and SLES. The time has arrived to remove it.
Some .py files that were imported from third parties are not changed to
enable easier replacement with updated versions if necessary.
solenv/gdb should continue to support Python 2.
bin/get-bugzilla-attachments-by-mimetype requires Python 2 to access
Launchpad.
Change-Id: I26414ae8e9f8402c90336af82020135685694217
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91697
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@cib.de>
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/configure.ac b/configure.ac index 5447d184fc3f..b8b40177e98e 100644 --- a/configure.ac +++ b/configure.ac @@ -8788,8 +8788,7 @@ AC_SUBST(LIBXML_LIBS) AC_SUBST(XMLLINT) # ===================================================================== -# Checking for a Python interpreter with version >= 2.7. -# Build and runtime requires Python 3 compatible version (>= 2.7). +# Checking for a Python interpreter with version >= 3.3. # Optionally user can pass an option to configure, i. e. # ./configure PYTHON=/usr/bin/python # ===================================================================== @@ -8798,7 +8797,7 @@ if test "$build_os" != "cygwin" -a "$enable_python" != fully-internal; then PYTHON_FOR_BUILD=$PYTHON else # This allows a lack of system python with no error, we use internal one in that case. - AM_PATH_PYTHON([2.7],, [:]) + AM_PATH_PYTHON([3.3],, [:]) # Clean PYTHON_VERSION checked below if cross-compiling PYTHON_VERSION="" if test "$PYTHON" != ":"; then @@ -8863,7 +8862,7 @@ fully-internal) system) AC_MSG_RESULT([system]) if test "$_os" = Darwin; then - AC_MSG_ERROR([--enable-python=system doesn't work on macOS: /System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7/unicodeobject.h is known to contain uses of "register", which is removed from C++17]) + AC_MSG_ERROR([--enable-python=system doesn't work on macOS because the version provided is obsolete]) fi ;; *) @@ -8981,11 +8980,10 @@ system) #include <Python.h> int main(int argc, char **argv) { - if ((PY_MAJOR_VERSION == 2 && PY_MINOR_VERSION >= 7) || - (PY_MAJOR_VERSION == 3 && PY_MINOR_VERSION >= 3)) return 0; + if ((PY_MAJOR_VERSION == 3 && PY_MINOR_VERSION >= 3)) return 0; else return 1; } - ]])],[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])]) + ]])],[AC_MSG_RESULT([ok])],[AC_MSG_ERROR([Python >= 3.3 is needed when building with Python 3])],[AC_MSG_RESULT([skipped; cross-compiling])]) CFLAGS=$save_CFLAGS AC_LANG_POP(C) |