[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-build-common] 49/50: python is not always python3.
From: |
gnunet |
Subject: |
[taler-build-common] 49/50: python is not always python3. |
Date: |
Sat, 02 Nov 2019 16:39:08 +0100 |
This is an automated email from the git hooks/post-receive script.
ng0 pushed a commit to branch master
in repository build-common.
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.
- [taler-build-common] 36/50: allow configure.py to be simpler, (continued)
- [taler-build-common] 36/50: allow configure.py to be simpler, gnunet, 2019/11/02
- [taler-build-common] 29/50: drop old imports, gnunet, 2019/11/02
- [taler-build-common] 40/50: syntax fix, gnunet, 2019/11/02
- [taler-build-common] 44/50: version check python., gnunet, 2019/11/02
- [taler-build-common] 35/50: exec, gnunet, 2019/11/02
- [taler-build-common] 50/50: use shlex.split(), gnunet, 2019/11/02
- [taler-build-common] 48/50: output pybabel and python versions. try to get minimal version. hack around browser not being found., gnunet, 2019/11/02
- [taler-build-common] 25/50: apply most feedback + lint, gnunet, 2019/11/02
- [taler-build-common] 28/50: check in code independent build system code., gnunet, 2019/11/02
- [taler-build-common] 41/50: start to make sh code reusable., gnunet, 2019/11/02
- [taler-build-common] 49/50: python is not always python3.,
gnunet <=
- [taler-build-common] 38/50: logging, gnunet, 2019/11/02
- [taler-build-common] 33/50: fix template, gnunet, 2019/11/02
- [taler-build-common] 42/50: Add PythonTool(). Contrary the code in sh/, it is limited to python3.7 - python4.0 right now., gnunet, 2019/11/02
- [taler-build-common] 37/50: link configure instead of copying, gnunet, 2019/11/02
- [taler-build-common] 27/50: refactor, rename switches, document more, add initial browser and pybabel detection., gnunet, 2019/11/02
- [taler-build-common] 43/50: configure: use a fixed location for the build-scripts., gnunet, 2019/11/02
- [taler-build-common] 39/50: configure: reduce tests to python3 + python3.7 + python3.8; add check for python3, gnunet, 2019/11/02
- [taler-build-common] 32/50: build scripts as library, gnunet, 2019/11/02
- [taler-build-common] 45/50: fix syntax warning., gnunet, 2019/11/02
- [taler-build-common] 47/50: Revert "move tests to t.", gnunet, 2019/11/02