Skip to content

Commit 82ac165

Browse files
committed
Message returncode for NumPy failure
1 parent 1046d4a commit 82ac165

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed

python/pyarrow/meson.build

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@
1919
# custom location check
2020
numpy_dep = dependency('numpy', required: false)
2121
if not numpy_dep.found()
22-
incdir_numpy = run_command(
23-
'python',
22+
cmd = run_command(
23+
py,
2424
[
2525
'-c',
2626
'''import os
@@ -35,8 +35,15 @@ except Exception:
3535
print(incdir)
3636
''',
3737
],
38-
check: true,
39-
).stdout().strip()
38+
check: false,
39+
)
40+
41+
if cmd.returncode() != 0
42+
message(cmd.stdout())
43+
message(cmd.stderr())
44+
error('Failure with NumPy command')
45+
endif
46+
numpy_inc = cmd.stdout().strip()
4047

4148
numpy_dep = declare_dependency(include_directories: incdir_numpy)
4249
endif

0 commit comments

Comments
 (0)