Skip to content

Commit afe2b14

Browse files
committed
Try to get meson to find the pyodide Python headers...
1 parent 5794e26 commit afe2b14

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

meson.build

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,13 @@ cython_lower = '>=3.0.11'
2121
cython_upper = '<3.3'
2222

2323
py = import('python').find_installation(pure: false)
24-
dep_py = py.dependency()
24+
if meson.is_cross_build() and host_machine.system() == 'emscripten'
25+
# Avoid picking up the runner's host python.pc via pkg-config.
26+
# For Pyodide, use the interpreter sysconfig data from pyodide-build instead.
27+
dep_py = py.dependency(method: 'system')
28+
else
29+
dep_py = py.dependency()
30+
endif
2531

2632
cc = meson.get_compiler('c')
2733
cy = meson.get_compiler('cython')

0 commit comments

Comments
 (0)