]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.12] gh-117711: Only check for 'test/wheeldata' when it's actually used (GH-117712...
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Thu, 11 Apr 2024 10:22:17 +0000 (12:22 +0200)
committerGitHub <noreply@github.com>
Thu, 11 Apr 2024 10:22:17 +0000 (10:22 +0000)
gh-117711: Only check for 'test/wheeldata' when it's actually used (GH-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.

(cherry picked from commit d4963871b03cc76fe7d9648d022d12007585beae)

Co-authored-by: Karolina Surma <33810531+befeleme@users.noreply.github.com>
Co-authored-by: Miro HronĨok <miro@hroncok.cz>
Lib/test/test_tools/test_makefile.py

index 17a1a6d0d38d7d9411fb4c1f2ae9f16371f6ff74..e253bd0049ffa6e1e235ff9322e4db3581c8502d 100644 (file)
@@ -66,6 +66,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))