Support for NumPy was added to Boost release 1.63. This additional numpy PACKAGECONFIG ensures that python3-numpy is added as build-time and run-time dependencies. It uses the custom-made python-numpy-include feature to supply the directory for the numpy module headers to the b2 build system.
If numpy is not added the PACKAGECONFIG it will still attempt the probe and fail gracefully like before. Signed-off-by: Rob Woolley <[email protected]> --- meta/recipes-support/boost/boost.inc | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/meta/recipes-support/boost/boost.inc b/meta/recipes-support/boost/boost.inc index a718a735dd..e0ffc20447 100644 --- a/meta/recipes-support/boost/boost.inc +++ b/meta/recipes-support/boost/boost.inc @@ -53,6 +53,7 @@ PACKAGECONFIG ??= "locale python" PACKAGECONFIG[locale] = ",,icu" PACKAGECONFIG[graph_parallel] = ",,,boost-mpi mpich" PACKAGECONFIG[mpi] = ",,mpich" +PACKAGECONFIG[numpy] = ",,python3-numpy" PACKAGECONFIG[python] = ",,python3" inherit python3-dir @@ -86,6 +87,8 @@ FILES:${PN}-serialization = "${libdir}/libboost_serialization*.so.* \ ${libdir}/libboost_wserialization*.so.*" FILES:${PN}-test = "${libdir}/libboost_prg_exec_monitor*.so.* \ ${libdir}/libboost_unit_test_framework*.so.*" +FILES:${PN}-python = "${libdir}/libboost_python*.so.* \ + ${libdir}/libboost_numpy*.so.*" # -dev last to pick up the remaining stuff PACKAGES += "${PN}-dev ${PN}-staticdev" @@ -173,7 +176,11 @@ do_configure() { # If we want Python then we need to tell Boost *exactly* where to find it if ${@bb.utils.contains('BOOST_LIBS', 'python', 'true', 'false', d)}; then - echo "using python : ${PYTHON_BASEVERSION} : ${STAGING_DIR_NATIVE}${bindir}/python3-native/python3 : ${STAGING_DIR_HOST}${includedir}/${PYTHON_DIR}${PYTHON_ABI} : ${STAGING_DIR_HOST}${libdir}/${PYTHON_DIR} ;" >> ${WORKDIR}/user-config.jam + if ${@bb.utils.contains('PACKAGECONFIG', 'numpy', 'true', 'false', d)}; then + # Use the python-numpy-include feature patched in to boost-build-native + ENABLE_NUMPY="<python-numpy-include>${STAGING_LIBDIR}/${PYTHON_DIR}/site-packages/numpy/_core/include" + fi + echo "using python : ${PYTHON_BASEVERSION} : ${STAGING_DIR_NATIVE}${bindir}/python3-native/python3 : ${STAGING_DIR_HOST}${includedir}/${PYTHON_DIR}${PYTHON_ABI} : ${STAGING_DIR_HOST}${libdir}/${PYTHON_DIR} : ${ENABLE_NUMPY} ;" >> ${WORKDIR}/user-config.jam fi if ${@bb.utils.contains('BOOST_LIBS', 'mpi', 'true', 'false', d)}; then -- 2.49.0
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#243303): https://lists.openembedded.org/g/openembedded-core/message/243303 Mute This Topic: https://lists.openembedded.org/mt/120724338/21656 Group Owner: [email protected] Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [[email protected]] -=-=-=-=-=-=-=-=-=-=-=-
