https://github.com/python/cpython/commit/d4963871b03cc76fe7d9648d022d12007585beae
commit: d4963871b03cc76fe7d9648d022d12007585beae
branch: main
author: Karolina Surma <[email protected]>
committer: vstinner <[email protected]>
date: 2024-04-11T11:37:28+02:00
summary:

gh-117711: Only check for 'test/wheeldata' when it's actually used (#117712)

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.

Co-authored-by: Miro HronĨok <[email protected]>

files:
M Lib/test/test_tools/test_makefile.py

diff --git a/Lib/test/test_tools/test_makefile.py 
b/Lib/test/test_tools/test_makefile.py
index 29f5c28e33bb2b..48a7c1a773bb83 100644
--- a/Lib/test/test_tools/test_makefile.py
+++ b/Lib/test/test_tools/test_makefile.py
@@ -67,6 +67,10 @@ 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')
+
         # Check that there are no extra entries:
         unique_test_dirs = set(test_dirs)
         self.assertSetEqual(unique_test_dirs, set(used))

_______________________________________________
Python-checkins mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/python-checkins.python.org/
Member address: [email protected]

Reply via email to