diff options
| author | Eli Schwartz <eschwartz@gentoo.org> | 2025-05-25 04:25:06 -0400 |
|---|---|---|
| committer | Eli Schwartz <eschwartz@gentoo.org> | 2025-05-25 04:37:22 -0400 |
| commit | 2a95fb1b5f0e2f5563516a5fa2c432b8f38b5618 (patch) | |
| tree | 0f3d463053ee1395e4b079f096d454ddbcf8b3b0 /dev-build/meson/files/unbreak-setuptools-test_installed.patch | |
| parent | 84cb8051f577a93ed129e4b38132c254ffc48552 (diff) | |
| download | gentoo-2a95fb1b5f0e2f5563516a5fa2c432b8f38b5618.tar.gz gentoo-2a95fb1b5f0e2f5563516a5fa2c432b8f38b5618.tar.bz2 gentoo-2a95fb1b5f0e2f5563516a5fa2c432b8f38b5618.zip | |
dev-build/meson: backport test fix for wonky setuptools interaction
Signed-off-by: Eli Schwartz <eschwartz@gentoo.org>
Diffstat (limited to 'dev-build/meson/files/unbreak-setuptools-test_installed.patch')
| -rw-r--r-- | dev-build/meson/files/unbreak-setuptools-test_installed.patch | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/dev-build/meson/files/unbreak-setuptools-test_installed.patch b/dev-build/meson/files/unbreak-setuptools-test_installed.patch new file mode 100644 index 000000000000..522b8ae81be9 --- /dev/null +++ b/dev-build/meson/files/unbreak-setuptools-test_installed.patch @@ -0,0 +1,34 @@ +From 23e4e2f20ca698f4070f7da79f5e06249d34b622 Mon Sep 17 00:00:00 2001 +From: Eli Schwartz <eschwartz93@gmail.com> +Date: Sat, 24 May 2025 22:38:44 -0400 +Subject: [PATCH] Unbreak "Fix setuptools 49 test. (fixes #7452)" + +This unbreaks commit 59910c437a81b94c72e3cbdfc2c3612fae576d6e. + +It kind of maybe appears to fix something but does break it all quite +terribly too. Totally random subdirectories of site-packages/ should +certainly not be added to PYTHONPATH regardless of anything else as that +may include mesonbuild/, leading to `import ast` finding mesonbuild.ast +instead... + +The underlying issue here is that egg .pth is not loaded from PYTHONPATH +at all, which means depending on versions of e.g. setuptools this test +may end up solely testing system-installed meson, or fail entirely. So +we can fix this by manually adding eggs specifically. +--- + run_meson_command_tests.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/run_meson_command_tests.py b/run_meson_command_tests.py +index f9faca9af6fe..7265d3e031e2 100755 +--- a/run_meson_command_tests.py ++++ b/run_meson_command_tests.py +@@ -143,7 +143,7 @@ def test_meson_installed(self): + 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 = [pylibdir] + [x for x in pylibdir.iterdir() if x.name.endswith('.egg')] + 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 |
