Skip to content

Commit d73060d

Browse files
committed
Clarify docstring
1 parent 522bc95 commit d73060d

File tree

1 file changed

+13
-8
lines changed

1 file changed

+13
-8
lines changed

spin/cmds/meson.py

+13-8
Original file line numberDiff line numberDiff line change
@@ -283,15 +283,15 @@ def build(
283283
quiet=False,
284284
build_dir=None,
285285
prefix=None,
286-
meson_compile_args=tuple(),
287-
meson_install_args=tuple(),
286+
meson_compile_args=(),
287+
meson_install_args=(),
288288
):
289289
"""🔧 Build package with Meson/ninja
290290
291291
The package is installed to `build-install` (unless a different
292292
build directory is specified with `-C`).
293293
294-
MESON_ARGS are passed through e.g.:
294+
MESON_ARGS are passed through to `meson setup` e.g.:
295295
296296
spin build -- -Dpkg_config_path=/lib64/pkgconfig
297297
@@ -335,7 +335,9 @@ def build(
335335
if gcov:
336336
meson_args_setup = meson_args_setup + ["-Db_coverage=true"]
337337

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+
)
339341

340342
if clean:
341343
print(f"Removing `{build_dir}`")
@@ -362,18 +364,20 @@ def build(
362364

363365
# Any other conditions that warrant a reconfigure?
364366

365-
meson_compile_args = list(meson_compile_args)
366367
compile_flags = ["-v"] if verbose else []
367368
if jobs:
368369
compile_flags += ["-j", str(jobs)]
369370

370371
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),
372377
sys_exit=True,
373378
output=not quiet,
374379
)
375380

376-
meson_install_args = list(meson_install_args)
377381
p = _run(
378382
_meson_cli()
379383
+ [
@@ -385,7 +389,8 @@ def build(
385389
install_dir
386390
if os.path.isabs(install_dir)
387391
else os.path.relpath(abs_install_dir, abs_build_dir),
388-
] + meson_install_args,
392+
]
393+
+ list(meson_install_args),
389394
output=(not quiet) and verbose,
390395
)
391396

0 commit comments

Comments
 (0)