From d03f8741fbef828db794b7d366c83b2055a655c3 Mon Sep 17 00:00:00 2001 From: Dmitry Shachnev Date: Sun, 14 Nov 2021 21:08:50 +0300 Subject: [PATCH] Find the build directory matching the current interpreter This is needed to allow us to run tests with all supported Python versions. Without this patch, the latest build directory will be always picked, no matter what the current interpreter is. Gbp-Pq: Name 0001-test-with-current-interpreter.patch --- testing/buildlog.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/testing/buildlog.py b/testing/buildlog.py index 90ff436d..034f1039 100644 --- a/testing/buildlog.py +++ b/testing/buildlog.py @@ -63,6 +63,11 @@ class BuildLog: ) sys.exit(1) + # We need to find the build directory for the current interpreter + py_version = "{}.{}".format(sys.version_info[0], sys.version_info[1]) + if py_version not in build_classifiers: + continue + if not os.path.exists(build_dir): rel_dir, low_part = os.path.split(build_dir) rel_dir, two_part = os.path.split(rel_dir) -- 2.30.2