Skip to content

Commit 2803540

Browse files
jamestjspclaude
andcommitted
fix: standalone meson build broken by absolute numpy include path
include_directories() rejects absolute paths in source tree. Use declare_dependency(compile_args: ['-I' + path]) instead. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 74eba6c commit 2803540

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

python/meson.build

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,7 @@ if not np_dep.found()
77
# Try to get numpy include path from Python
88
numpy_include = run_command(py, ['-c', 'import numpy; print(numpy.get_include())'],
99
check: true).stdout().strip()
10-
np_inc = include_directories(numpy_include)
11-
else
12-
np_inc = []
10+
np_dep = declare_dependency(compile_args: ['-I' + numpy_include])
1311
endif
1412

1513
# Generate docstrings.h from docstrings.json
@@ -58,7 +56,7 @@ wrapper_sources = files(
5856
# Build Python extension module
5957
py.extension_module('_slicot',
6058
[wrapper_sources, docstrings_gen],
61-
include_directories: [inc, 'data', np_inc],
59+
include_directories: [inc, 'data'],
6260
dependencies: [py_dep, np_dep, slicot_dep],
6361
c_args: fc_defines,
6462
subdir: 'slicot',

0 commit comments

Comments
 (0)