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.
pull/13552/head
Dylan Baker 4 months ago committed by Eli Schwartz
parent 85e92331cb
commit 67b238d616
No known key found for this signature in database
GPG Key ID: CEB167EFB5722BD6
  1. 2
      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']) mesonrewrite = shlex.split(os.environ['MESONREWRITE'])
rewrite_cmd = ['kwargs', 'set', 'project', '/', 'version', 'release'] 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' modfile = source_root / 'prog.c'
with modfile.open('w') as f: with modfile.open('w') as f:

Loading…
Cancel
Save