From 32a2c748f8296534e287d377d434ac11ef25b993 Mon Sep 17 00:00:00 2001 From: Karolina Surma Date: Wed, 10 Apr 2024 15:35:04 +0200 Subject: [PATCH 1/2] Only check for 'test/wheeldata' when it's actually used It's possible to build Python with option `--with-wheel-pkg-dir` pointing to a custom wheel directory. Don't include the directory in the test set if the wheels are used from a different location. --- Lib/test/test_tools/test_makefile.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Lib/test/test_tools/test_makefile.py b/Lib/test/test_tools/test_makefile.py index 29f5c28e33bb2b..b0dc56c714c0f9 100644 --- a/Lib/test/test_tools/test_makefile.py +++ b/Lib/test/test_tools/test_makefile.py @@ -67,6 +67,9 @@ def test_makefile_test_folders(self): ) used.append(relpath) + if sysconfig.get_config_var('WHEEL_PKG_DIR'): + test_dirs.remove('test/wheeldata') + # Check that there are no extra entries: unique_test_dirs = set(test_dirs) self.assertSetEqual(unique_test_dirs, set(used)) From 02c9ff4171267fd6ad3057ea40f557ceac82841a Mon Sep 17 00:00:00 2001 From: Karolina Surma <33810531+befeleme@users.noreply.github.com> Date: Wed, 10 Apr 2024 21:03:01 +0200 Subject: [PATCH 2/2] Update Lib/test/test_tools/test_makefile.py MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Miro HronĨok --- Lib/test/test_tools/test_makefile.py | 1 + 1 file changed, 1 insertion(+) diff --git a/Lib/test/test_tools/test_makefile.py b/Lib/test/test_tools/test_makefile.py index b0dc56c714c0f9..48a7c1a773bb83 100644 --- a/Lib/test/test_tools/test_makefile.py +++ b/Lib/test/test_tools/test_makefile.py @@ -67,6 +67,7 @@ def test_makefile_test_folders(self): ) used.append(relpath) + # Don't check the wheel dir when Python is built --with-wheel-pkg-dir if sysconfig.get_config_var('WHEEL_PKG_DIR'): test_dirs.remove('test/wheeldata')