gnunet-svn
[Top][All Lists]
Advanced

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

[taler-taler-build-scripts] branch master updated: python is not always


From: gnunet
Subject: [taler-taler-build-scripts] branch master updated: python is not always python3.
Date: Tue, 29 Oct 2019 22:37:12 +0100

This is an automated email from the git hooks/post-receive script.

ng0 pushed a commit to branch master
in repository taler-build-scripts.

The following commit(s) were added to refs/heads/master by this push:
     new 426b0a9  python is not always python3.
426b0a9 is described below

commit 426b0a9cf04cf1712c7bd644ee6c1d74caf97917
Author: ng0 <address@hidden>
AuthorDate: Tue Oct 29 21:36:56 2019 +0000

    python is not always python3.
---
 talerbuildconfig.py | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/talerbuildconfig.py b/talerbuildconfig.py
index ac3866e..cdc5774 100644
--- a/talerbuildconfig.py
+++ b/talerbuildconfig.py
@@ -234,10 +234,12 @@ class PythonTool(Tool):
     def check(self, buildconfig):
         # No suffix. Would probably be cheaper to do this in
         # the dict as well. We need at least version 3.7.
-        if existence("python"):
-            if sys.version_info >= (3, 7):
-                python3_version = sys.version[0:5]
-                buildconfig._set_tool("python", "python", python3_version)
+        if existence("python") and (subprocess.check_output(["python", 
"--version"]).split()[1] >= b'3.7'):
+            # python might not be python3. It might not even be
+            # python 3.x.
+            python_version = subprocess.check_output(["python", 
"--version"]).split()[1]
+            if python_version >= b'3.7':
+                buildconfig._set_tool("python", "python", python_version)
                 return True
         else:
             # Has suffix, try suffix. We know the names in advance,

-- 
To stop receiving notification emails like this one, please contact
address@hidden.



reply via email to

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