···11--- a/mesonbuild/coredata.py
22+++ b/mesonbuild/coredata.py
33-@@ -266,18 +266,13 @@
33+@@ -282,18 +282,13 @@
44 '''
55 if option.endswith('dir') and os.path.isabs(value) and \
66 option not in builtin_dir_noprefix_options:
···88 # commonpath will always return a path in the native format, so we
99 # must use pathlib.PurePath to do the same conversion before
1010 # comparing.
1111-- if commonpath([value, prefix]) != str(PurePath(prefix)):
1111+- if os.path.commonpath([value, prefix]) != str(PurePath(prefix)):
1212- m = 'The value of the {!r} option is {!r} which must be a ' \
1313- 'subdir of the prefix {!r}.\nNote that if you pass a ' \
1414- 'relative path, it is assumed to be a subdir of prefix.'
···1616- # Convert path to be relative to prefix
1717- skip = len(prefix) + 1
1818- value = value[skip:]
1919-+ if commonpath([value, prefix]) == str(PurePath(prefix)):
1919++ if os.path.commonpath([value, prefix]) == str(PurePath(prefix)):
2020+ # Convert path to be relative to prefix
2121+ skip = len(prefix) + 1
2222+ value = value[skip:]