From 59910c437a81b94c72e3cbdfc2c3612fae576d6e Mon Sep 17 00:00:00 2001 From: Daniel Mensinger Date: Fri, 17 Jul 2020 18:17:47 +0200 Subject: [PATCH] Fix setuptools 49 test. (fixes #7452) --- run_meson_command_tests.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/run_meson_command_tests.py b/run_meson_command_tests.py index 6ed3d8f8d..7bc6185f1 100755 --- a/run_meson_command_tests.py +++ b/run_meson_command_tests.py @@ -129,6 +129,10 @@ class CommandTests(unittest.TestCase): os.environ['PYTHONPATH'] = os.path.join(str(pylibdir), '') os.environ['PATH'] = str(bindir) + os.pathsep + os.environ['PATH'] self._run(python_command + ['setup.py', 'install', '--prefix', str(prefix)]) + # Fix importlib-metadata by appending all dirs in pylibdir + PYTHONPATHS = [pylibdir] + [x for x in pylibdir.iterdir()] + PYTHONPATHS = [os.path.join(str(x), '') for x in PYTHONPATHS] + os.environ['PYTHONPATH'] = os.pathsep.join(PYTHONPATHS) # Check that all the files were installed correctly self.assertTrue(bindir.is_dir()) self.assertTrue(pylibdir.is_dir())