From 25e6444b3f4601c7821beab06bc4520deacb007b Mon Sep 17 00:00:00 2001 From: Alon Bar-Lev Date: Sat, 8 Apr 2017 16:34:30 +0300 Subject: python: Remove usage of PYTHON_VERSIONS * configure.ac: Remove PYTHON_VERSIONS subst. * lang/python/Makefile.am: Use basename of python as builddir prefix. * lang/python/tests/run-tests.py: Likewise. -- Two variables needs be at sync PYTHONS and PYTHON_VERSIONS, these may go out of sync in some cases, for example in Gentoo where default python is 3.4 we get: PYTHON='/usr/bin/python2' PYTHONS='/usr/bin/python /usr/bin/python2' PYTHON_VERSIONS='2.7 3.4' We can use the basename of the python interpreter to achieve similar effect without having to sync indexes between these two variables. Signed-off-by: Alon Bar-Lev --- lang/python/tests/run-tests.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lang/python/tests/run-tests.py') diff --git a/lang/python/tests/run-tests.py b/lang/python/tests/run-tests.py index 9e2fb78c..f236712f 100644 --- a/lang/python/tests/run-tests.py +++ b/lang/python/tests/run-tests.py @@ -70,8 +70,8 @@ for interpreter in args.interpreters: [interpreter, "-c", "import sys; print('{0}.{1}'.format(sys.version_info[0], sys.version_info[1]))"]).strip().decode() pattern = os.path.join(args.builddir, "..", - "python{0}-gpg".format(version), - "lib*"+version) + "{0}-gpg".format(os.path.basename(interpreter)), + "lib*") builddirs = glob.glob(pattern) if len(builddirs) == 0: sys.exit("Build directory matching {0!r} not found.".format(pattern)) -- cgit v1.2.3