boost: Fix issue with python-numpy
Boost 1.63 merged Boost.Python numpy support, however there are no configuration options to turn it off or on.
If PACKAGECONFIG[python] is enabled, now depend on python-numpy and python3-numpy.
---
Hi all,
I'm not sure if this is the entirely correct fix. I've seen other places like gentoo ([1]) simply patch out the numpy support to get earlier behavior.
Maybe making it another PACKAGECONFIG[numpy] option would be desirable?
Cheers,
Moritz
--- meta/recipes-support/boost/boost.inc | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-)
meta/recipes-support/boost/boost.inc +7 -3
@@ -42,13 +42,13 @@ PACKAGECONFIG ??= "locale" PACKAGECONFIG[locale] = ",,icu" PACKAGECONFIG[graph_parallel] = ",,,boost-mpi mpich" PACKAGECONFIG[mpi] = ",,mpich" -PACKAGECONFIG[python] = ",,python python3" +PACKAGECONFIG[python] = ",,python python3 python-numpy python3-numpy" BOOST_LIBS += "\ ${@bb.utils.filter('PACKAGECONFIG', 'locale', d)} \ ${@bb.utils.contains('PACKAGECONFIG', 'graph_parallel', 'graph_parallel mpi', \ bb.utils.filter('PACKAGECONFIG', 'mpi', d), d)} \ - ${@bb.utils.contains('PACKAGECONFIG', 'python', 'python python3', '', d)} \ + ${@bb.utils.contains('PACKAGECONFIG', 'python', 'python python3 numpy numpy3', '', d)} \ " inherit python-dir
@@ -61,7 +61,8 @@ python __anonymous () { extras = [] for lib in d.getVar('BOOST_LIBS').split( ): # BJAM does not know '--with-python3' (only --with-python) - if lib != "python3": + # the same goes for numpy and numpy3 + if (lib != "python3") and (lib != "numpy") and (lib != "numpy3"): extras.append("--with-%s" % lib) pkg = "boost-%s" % lib.replace("_", "-") packages.append(pkg)
@@ -69,6 +70,9 @@ python __anonymous () { # special: python*.so matches python3.so !! if not d.getVar("FILES_%s" % pkg): d.setVar("FILES_%s" % pkg, "${libdir}/libboost_%s.so.*" % lib) + elif(lib == "numpy"): + if not d.getVar("FILES_%s" % pkg): + d.setVar("FILES_%s" % pkg, "${libdir}/libboost_%s.so.*" % lib) else: if not d.getVar("FILES_%s" % pkg): d.setVar("FILES_%s" % pkg, "${libdir}/libboost_%s*.so.*" % lib)
Signature · 1 line
2.7.4
Quoted 3 lines · Moritz Fischer
Maybe making it another PACKAGECONFIG[numpy] option would be desirable?
Making another option would definitely be desirable.
Ross
Ross,
Quoted 1 line · Ross
Making another option would definitely be desirable.
So would you apply the patch to remove it if not PACKAGECONFIG[numpy]?
Cheers,
Moritz
Quoted 4 lines · Moritz Fischer
Quoted 1 line
Making another option would definitely be desirable.
So would you apply the patch to remove it if not PACKAGECONFIG[numpy]?
Depends on how the patch is implemented. You might need to patch the build configuration to expose an option.
Ross