@@ -283,15 +283,15 @@ def build(
283
283
quiet = False ,
284
284
build_dir = None ,
285
285
prefix = None ,
286
- meson_compile_args = tuple (),
287
- meson_install_args = tuple (),
286
+ meson_compile_args = (),
287
+ meson_install_args = (),
288
288
):
289
289
"""🔧 Build package with Meson/ninja
290
290
291
291
The package is installed to `build-install` (unless a different
292
292
build directory is specified with `-C`).
293
293
294
- MESON_ARGS are passed through e.g.:
294
+ MESON_ARGS are passed through to `meson setup` e.g.:
295
295
296
296
spin build -- -Dpkg_config_path=/lib64/pkgconfig
297
297
@@ -335,7 +335,9 @@ def build(
335
335
if gcov :
336
336
meson_args_setup = meson_args_setup + ["-Db_coverage=true" ]
337
337
338
- setup_cmd = _meson_cli () + ["setup" , build_dir , f"--prefix={ prefix } " ] + meson_args_setup
338
+ setup_cmd = (
339
+ _meson_cli () + ["setup" , build_dir , f"--prefix={ prefix } " ] + meson_args_setup
340
+ )
339
341
340
342
if clean :
341
343
print (f"Removing `{ build_dir } `" )
@@ -362,18 +364,20 @@ def build(
362
364
363
365
# Any other conditions that warrant a reconfigure?
364
366
365
- meson_compile_args = list (meson_compile_args )
366
367
compile_flags = ["-v" ] if verbose else []
367
368
if jobs :
368
369
compile_flags += ["-j" , str (jobs )]
369
370
370
371
p = _run (
371
- _meson_cli () + ["compile" ] + compile_flags + ["-C" , build_dir ] + meson_compile_args ,
372
+ _meson_cli ()
373
+ + ["compile" ]
374
+ + compile_flags
375
+ + ["-C" , build_dir ]
376
+ + list (meson_compile_args ),
372
377
sys_exit = True ,
373
378
output = not quiet ,
374
379
)
375
380
376
- meson_install_args = list (meson_install_args )
377
381
p = _run (
378
382
_meson_cli ()
379
383
+ [
@@ -385,7 +389,8 @@ def build(
385
389
install_dir
386
390
if os .path .isabs (install_dir )
387
391
else os .path .relpath (abs_install_dir , abs_build_dir ),
388
- ] + meson_install_args ,
392
+ ]
393
+ + list (meson_install_args ),
389
394
output = (not quiet ) and verbose ,
390
395
)
391
396
0 commit comments