From 67b238d6161d79674dc513cafed5236eb255dddd Mon Sep 17 00:00:00 2001 From: Dylan Baker Date: Wed, 17 Jul 2024 09:26:50 -0700 Subject: [PATCH] unittests: fix git dist test on Windows with Python < 3.8 pathlib.Path objects are not supported in subprocess calls on Windows before Python 3.8, so we must convert to a string. --- test cases/unit/35 dist script/subprojects/sub/dist-script.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test cases/unit/35 dist script/subprojects/sub/dist-script.py b/test cases/unit/35 dist script/subprojects/sub/dist-script.py index 5f1b4a124..5166a26f5 100644 --- a/test cases/unit/35 dist script/subprojects/sub/dist-script.py +++ b/test cases/unit/35 dist script/subprojects/sub/dist-script.py @@ -12,7 +12,7 @@ source_root = pathlib.Path(os.environ['MESON_PROJECT_DIST_ROOT']) mesonrewrite = shlex.split(os.environ['MESONREWRITE']) rewrite_cmd = ['kwargs', 'set', 'project', '/', 'version', 'release'] -subprocess.run([*mesonrewrite, '-s', source_root, *rewrite_cmd], check=True) +subprocess.run([*mesonrewrite, '-s', str(source_root.absolute()), *rewrite_cmd], check=True) modfile = source_root / 'prog.c' with modfile.open('w') as f: