From 294ad21471906c4d44d723f73e46aa68a4b9311e Mon Sep 17 00:00:00 2001 From: Fred Wright Date: Sat, 17 Nov 2018 17:43:07 -0800 Subject: Make sure 'python-versions' uses the right Python. Although in-tree testing is sometimes able to find the Python libraries via program-relative addressing, later Python versions name compiled extensions in a version-dependent manner. This means that programs need to run with the specific version of Python that the extensions were compiled for. This change invokes the "target_python" explicitly for the version checks, rather than using the system-default Python. This is the same approach that is taken by all other Python-based tests. TESTED: The 'python-versions' test now passes with "target_python=python3.7", while the system-default Python is 2.7. This is after already building the extensions; another commit will add the missing dependencies. --- SConstruct | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'SConstruct') diff --git a/SConstruct b/SConstruct index 752ed826..fded8a3a 100644 --- a/SConstruct +++ b/SConstruct @@ -1913,7 +1913,7 @@ if env['python']: verenv['DISPLAY'] = '' # Avoid launching X11 in X11 progs pp = [] for p in python_progs: - pp.append("$SRCDIR/%s -V" % p) + pp.append("$PYTHON $SRCDIR/%s -V" % p) python_versions = Utility('python-versions', python_progs, pp, ENV=verenv) else: -- cgit v1.2.1