From 930167e9612f27ecc341f392b89abd45c8028656 Mon Sep 17 00:00:00 2001 From: Ankit Daftery Date: Sat, 28 May 2011 12:52:29 +0000 Subject: [PATCH] New addition to support boost.build --- libs/python/numpy/src/Jamfile | 61 +++++++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 libs/python/numpy/src/Jamfile diff --git a/libs/python/numpy/src/Jamfile b/libs/python/numpy/src/Jamfile new file mode 100644 index 00000000..c8b6fd3b --- /dev/null +++ b/libs/python/numpy/src/Jamfile @@ -0,0 +1,61 @@ +import os ; +import indirect ; +import modules ; +import feature ; +import python ; + +using python ; + +libraries = ; + +local rule probe ( python-cmd ) +{ + local full-cmd = + $(python-cmd)" -c \"from numpy.distutils import misc_util; print misc_util.get_numpy_include_dirs()" ; + + local output = [ shell-cmd $(full-cmd) ] ; + return $(output) ; +} + + + +if [ python.configured ] +{ + +project boost/numpy + : source-location . +# : requirements + ; + +lib boost_python ; + +lib boost_numpy + : # sources + dtype.cpp + scalars.cpp + ndarray.cpp + matrix.cpp + ufunc.cpp + numpy.cpp + : # requirements + /python//python_for_extensions + #/boost/python//boost_python + boost_python + : # default build + shared + ; + +libraries += boost_numpy ; + +} +else if ! ( --without-python in [ modules.peek : ARGV ] ) +{ + message boost_numpy + : "warning: No python installation configured and autoconfiguration" + : "note: failed. See http://www.boost.org/libs/python/doc/building.html" + : "note: for configuration instructions or pass --without-python to" + : "note: suppress this message and silently skip all Boost.NumPy targets" + ; +} + +#boost-install $(libraries) ;