lilypond-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Switch to Python 3.x (issue 545370043 by address@hidden)


From: jonas . hahnfeld
Subject: Re: Switch to Python 3.x (issue 545370043 by address@hidden)
Date: Fri, 20 Dec 2019 00:51:55 -0800

Reviewers: lemzwerg,

Message:
On 2019/12/20 00:12:25, lemzwerg wrote:
Mhmm, I'm not happy with that.  What I can imagine is to *prefer*
Python 3.x
over 2.x.

Is there a reason to enforce 3.x?  I thought that all of your recent
work was to
ensure that the scripts work both with 2.x and 3.x – am I missing
something?

As I said on the mailing list multiple times, it's actually a ton of
work to make the scripts work with Python 2 _and_ Python 3 at the same
time. I'm not going to spend that effort. It's correct that the changes
up to now are compatible with both - simply because I didn't want to
break the current setup.
Please have a look at the result of 2to3:
https://codereview.appspot.com/573340043 This change simply won't work
with Python 2 but is actually required to make the scripts work with
Python 3.

Description:
Switch to Python 3.x

Find and require at least Python 3.5 which will allow us to address
some deprecation warnings, most notably about the 'imp' module.
The major version 3.5 was first released in September 2015 and should
be available in all major distributions, including Ubuntu LTS 16.04 and
18.04 as well as CentOS/RHEL 7.x and 8.x.

Please review this at https://codereview.appspot.com/545370043/

Affected files (+7, -5 lines):
  M aclocal.m4
  M configure.ac


Index: aclocal.m4
diff --git a/aclocal.m4 b/aclocal.m4
index 19e19c0bd5e9e6cf18d00f4eb472fe37968567d9..7b3722dd0cce043b4e0ba9ebb21ab8e904d4dad0 100644
--- a/aclocal.m4
+++ b/aclocal.m4
@@ -989,7 +989,7 @@ AC_DEFUN(STEPMAKE_INIT, [
     fi
     AC_SUBST(SHELL)

-    STEPMAKE_PYTHON(REQUIRED, 1.5, 3.0)
+    STEPMAKE_PYTHON(REQUIRED, 3.5, 3.99)

     if expr "$MAKE" : '.*\(echo\)' >/dev/null; then
         $MAKE -v 2> /dev/null | grep GNU > /dev/null
@@ -1147,9 +1147,11 @@ AC_DEFUN(STEPMAKE_PYTHON, [
     AC_MSG_CHECKING([for python])
     python="python"
     found="no"
- for r in $PYTHON python python3 python3.3 python3.2 python3.1 python3.0 \
-             python2 python2.7 python2.6 python2.5 python2.4 \
-             python2.3 python2.2 python2.1 python2.0; do
+    for r in $PYTHON python python3 \
+             python3.8 \
+             python3.7 \
+             python3.6 \
+             python3.5; do
         exe=`STEPMAKE_GET_EXECUTABLE($r)`
         if ! $exe -V > /dev/null 2>&1 ; then
             continue
Index: configure.ac
diff --git a/configure.ac b/configure.ac
index 18238b5095e8d2c88536f868c13d774ded18299d..d97840edccf8a2d41b35e3f30ffdad2e593ba28d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -170,7 +170,7 @@ fi

 AC_LANG([C++])

-STEPMAKE_PYTHON(REQUIRED, 2.4, 3.0)
+STEPMAKE_PYTHON(REQUIRED, 3.5, 3.99)
 # this checks if we have GNU C by compiling a program with
 # __GNUC__, but that macro now unofficially means "the compiler
 # supports the GNU C extensions" -- the intel C compiler and clang



reply via email to

[Prev in Thread] Current Thread [Next in Thread]