summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKarolina Surma <33810531+befeleme@users.noreply.github.com>2024-04-11 09:37:28 (GMT)
committerGitHub <noreply@github.com>2024-04-11 09:37:28 (GMT)
commitd4963871b03cc76fe7d9648d022d12007585beae (patch)
tree54c3e382d779542c8018a5a1eabeba519d6fa095
parent02f1385f8ad6bf45376377c41f106b386d3a7eb0 (diff)
downloadcpython-d4963871b03cc76fe7d9648d022d12007585beae.zip
cpython-d4963871b03cc76fe7d9648d022d12007585beae.tar.gz
cpython-d4963871b03cc76fe7d9648d022d12007585beae.tar.bz2
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 <miro@hroncok.cz>
-rw-r--r--Lib/test/test_tools/test_makefile.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/Lib/test/test_tools/test_makefile.py b/Lib/test/test_tools/test_makefile.py
index 29f5c28..48a7c1a 100644
--- a/Lib/test/test_tools/test_makefile.py
+++ b/Lib/test/test_tools/test_makefile.py
@@ -67,6 +67,10 @@ class TestMakefile(unittest.TestCase):
)
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))