python: fix run-tests missing python_libdir

* lang/python/tests/run-tests.py: Set python_libdir if --python-libdir
is set.

Signed-off-by: Alon Bar-Lev <alon.barlev@gmail.com>
This commit is contained in:
Alon Bar-Lev 2017-04-11 01:55:13 +03:00 committed by Justus Winter
parent 63bec9f486
commit d785c053a9
No known key found for this signature in database
GPG Key ID: DD1A52F9DA8C9020

View File

@ -72,7 +72,9 @@ for interpreter in args.interpreters:
version = subprocess.check_output(
[interpreter, "-c", "import sys; print('{0}.{1}'.format(sys.version_info[0], sys.version_info[1]))"]).strip().decode()
if not args.python_libdir:
if args.python_libdir:
python_libdir = args.python_libdir
else:
pattern = os.path.join(args.builddir, "..",
"{0}-gpg".format(os.path.basename(interpreter)),
"lib*")