--- numpy/core/meson.build.orig 2024-02-05 21:17:48 UTC +++ numpy/core/meson.build @@ -621,6 +621,23 @@ src_ufunc_api = custom_target('__ufunc_api', install_dir: np_dir / 'core/include/numpy' ) +# Write out pkg-config file +# ------------------------- + +# Note: we can't use Meson's built-in pkgconfig module, because we have to +# install numpy.pc within site-packages rather than in its normal location. +cdata_numpy_pc = configuration_data() +cdata_numpy_pc.set('version', meson.project_version()) + +# Note: keep install path in sync with numpy/_configtool.py +_numpy_pc = configure_file( + input: 'numpy.pc.in', + output: 'numpy.pc', + configuration: cdata_numpy_pc, + install: true, + install_dir: np_dir / 'core/lib/pkgconfig', + install_tag: 'devel' +) # Set common build flags for C and C++ code # -----------------------------------------