@@ -50,6 +50,11 @@ from common.meson import (
50
50
)
51
51
from common .software import Project
52
52
53
+ WINDOWS_API_VERS = (4 ,)
54
+ LINUX_API_VERS = (3 ,)
55
+ # we have a higher minimum than the underlying meson.build
56
+ MESON_MIN_VER = (1 , 5 , 0 )
57
+
53
58
CACHEDIR_TAG_CONTENTS = '''Signature: 8a477f597d28d172789f06886806bc55
54
59
# This file is a cache directory tag created by openslide-bin.
55
60
# For information about cache directory tags, see https://bford.info/cachedir/
@@ -147,16 +152,26 @@ class BuildParams:
147
152
return False
148
153
149
154
with self .lock ():
150
- if has_api ('winbuild' , [ 1 , 2 , 3 ] ):
155
+ if has_api ('winbuild' , WINDOWS_API_VERS ):
151
156
plat : Platform = MesonPlatform (
152
157
self , 'windows' , 'x64' , cross = True
153
158
)
154
- elif has_api ('linux' , [ 1 , 2 ] ):
159
+ elif has_api ('linux' , LINUX_API_VERS ):
155
160
plat = MesonPlatform (
156
161
self , 'linux' , platform .machine (), cross = False
157
162
)
158
163
elif sys .platform == 'darwin' :
159
164
# no container image to check for
165
+ meson_ver = (
166
+ subprocess .check_output (['meson' , '--version' ])
167
+ .decode ()
168
+ .strip ()
169
+ )
170
+ if tuple (int (c ) for c in meson_ver .split ('.' )) < MESON_MIN_VER :
171
+ raise Exception (
172
+ f'Meson version { meson_ver } < '
173
+ f'{ "." .join (str (c ) for c in MESON_MIN_VER )} '
174
+ )
160
175
plat = MacPlatform (self , ['arm64' , 'x86_64' ])
161
176
else :
162
177
raise Exception (
@@ -344,11 +359,6 @@ class MesonPlatform(Platform):
344
359
cwd = self .params .root ,
345
360
)
346
361
dir = self ._setup ('sdist' , ['-Dall_systems=true' ])
347
- # avoid spurious complaints about a dirty work tree
348
- # https://github.com/mesonbuild/meson/pull/13152
349
- subprocess .check_call (
350
- ['git' , 'update-index' , '-q' , '--refresh' ], cwd = self .params .root
351
- )
352
362
subprocess .check_call (
353
363
[
354
364
# xz compresses better, but PyPI requires tar.gz, and there's
0 commit comments