commit: 7085ccd609ce8b488a8af6297911216776be464c Author: Eli Schwartz <eschwartz93 <AT> gmail <DOT> com> AuthorDate: Wed Dec 27 06:16:43 2023 +0000 Commit: Sam James <sam <AT> gentoo <DOT> org> CommitDate: Wed Dec 27 13:31:02 2023 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7085ccd6
dev-util/meson: solve the python2 test breakage correctly this time The problem is that python-utils-r1 adds some wrappers around all the python impls. I am not sure what these wrappers do (we don't even use the python3 one, since the PEP517 installed copy of meson comes before that in PATH, and overrides it) but it also poisons the `python2` command with a script that says it is unsupported. Well, no kidding it's unsupported to invoke building and installing a python3.11 wheel using a `python2` command. However, we are not actually trying to do this. So we should not feel constrained by this, either. Signed-off-by: Eli Schwartz <eschwartz93 <AT> gmail.com> Signed-off-by: Sam James <sam <AT> gentoo.org> dev-util/meson/meson-1.3.1.ebuild | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/dev-util/meson/meson-1.3.1.ebuild b/dev-util/meson/meson-1.3.1.ebuild index 3e41566b7b9c..4abc34926a12 100644 --- a/dev-util/meson/meson-1.3.1.ebuild +++ b/dev-util/meson/meson-1.3.1.ebuild @@ -74,9 +74,6 @@ python_prepare_all() { # https://github.com/mesonbuild/meson/issues/7203 -e 's/test_templates/_&/' - - # Broken due to python2 wrapper - -e 's/test_python_module/_&/' ) sed -i "${disable_unittests[@]}" unittests/*.py || die @@ -98,6 +95,11 @@ src_test() { python_test() { ( + # remove unwanted python_wrapper_setup contents + # We actually do want to non-error if python2 is installed and tested. + remove="${T}/${EPYTHON}/bin:" + PATH=${PATH/${remove}/} + # test_meson_installed unset PYTHONDONTWRITEBYTECODE