Skip to content

Commit 59910c4

Browse files
mensindajpakkane
authored andcommitted
Fix setuptools 49 test. (fixes mesonbuild#7452)
1 parent 2353d67 commit 59910c4

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

run_meson_command_tests.py

+4
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,10 @@ def test_meson_installed(self):
129129
os.environ['PYTHONPATH'] = os.path.join(str(pylibdir), '')
130130
os.environ['PATH'] = str(bindir) + os.pathsep + os.environ['PATH']
131131
self._run(python_command + ['setup.py', 'install', '--prefix', str(prefix)])
132+
# Fix importlib-metadata by appending all dirs in pylibdir
133+
PYTHONPATHS = [pylibdir] + [x for x in pylibdir.iterdir()]
134+
PYTHONPATHS = [os.path.join(str(x), '') for x in PYTHONPATHS]
135+
os.environ['PYTHONPATH'] = os.pathsep.join(PYTHONPATHS)
132136
# Check that all the files were installed correctly
133137
self.assertTrue(bindir.is_dir())
134138
self.assertTrue(pylibdir.is_dir())

0 commit comments

Comments
 (0)