diff --git a/Jamroot.jam b/Jamroot similarity index 100% rename from Jamroot.jam rename to Jamroot diff --git a/libs/python/numpy/src/Jamfile b/libs/python/numpy/src/Jamfile index e2c8c4c2..8f52e27b 100644 --- a/libs/python/numpy/src/Jamfile +++ b/libs/python/numpy/src/Jamfile @@ -1,12 +1,10 @@ import python ; -import numpy ; - +#import numpy ; +import regex ; using python ; libraries = ; -#How will the probe command be called ? - if [ python.configured ] { @@ -17,6 +15,20 @@ project boost/numpy lib boost_python ; +rule numpy-includes ( properties * ) +{ + import feature ; + local python-interpreter = [ feature.get-values python.interpreter : $(properties) ] ; + if $(python-interpreter) + { + local full-cmd = + $(python-interpreter)" -c \"from numpy.distutils import misc_util; print ':'.join(misc_util.get_numpy_include_dirs())\" " ; + local output = [ SHELL $(full-cmd) ] ; + local includes = [ regex.split $(output) ":" ] ; + return $(includes) ; + } +} + lib boost_numpy : # sources dtype.cpp @@ -29,8 +41,11 @@ lib boost_numpy /python//python_for_extensions #/boost/python//boost_python boost_python + @numpy-includes : # default build shared + : # usage requirements + @numpy-includes ; libraries += boost_numpy ; diff --git a/libs/python/numpy/test/Jamfile b/libs/python/numpy/test/Jamfile index 4f65c406..6d6b0344 100644 --- a/libs/python/numpy/test/Jamfile +++ b/libs/python/numpy/test/Jamfile @@ -1,18 +1,20 @@ -import numpy ; - +import testing ; +import python ; use-project /boost/numpy : ../src ; -project /boost/numpy/test - : requirements - # Why isn't this provided by 'using python' ? - #/usr/include/python2.7 - ; +project /boost/numpy/test ; +rule numpy-test ( name : sources * : requirements * ) +{ + sources ?= $(name).py $(name)_mod.cpp ; + return [ testing.make-test run-pyd : $(sources) /boost/numpy//boost_numpy + : $(requirements) : $(name) ] ; +} test-suite numpy : -[ numpy.numpy-test templates ] -[ numpy.numpy-test ufunc ] + [ numpy-test templates ] + [ numpy-test ufunc ] ; diff --git a/numpy.jam b/numpy.jam deleted file mode 100644 index 79b53169..00000000 --- a/numpy.jam +++ /dev/null @@ -1,23 +0,0 @@ -import testing ; -import python ; - -rule init ( ) -{ - project.push-current $(.project) ; - debug-message Configuring numpy... ; - - local full-cmd = - $(python.interpreter)" -c \"from numpy.distutils import misc_util; print misc_util.get_numpy_include_dirs()" ; - - local output = [ shell-cmd $(full-cmd) ] ; - includes = $(output) ; - - project.pop-current ; -} - -rule numpy-test ( name : sources * : requirements * ) -{ - sources ?= $(name).py $(name)_mod.cpp ; - return [ testing.make-test run-pyd : $(sources) /boost/numpy//boost_numpy - : $(requirements) : $(name) ] ; -} diff --git a/patch b/patch deleted file mode 100644 index ddaa489d..00000000 --- a/patch +++ /dev/null @@ -1,14 +0,0 @@ -Index: SConscript -=================================================================== ---- SConscript (revision 70774) -+++ SConscript (working copy) -@@ -10,7 +10,8 @@ - ) - bp_numpy_env = scons_tools.GetEnvironment().Clone() - bp_numpy_env.Append(CPPPATH=[os.path.abspath(os.curdir)]) --libpath = os.path.abspath("%s/python/numpy/src" % scons_tools.GetBuildDir()) -+#libpath = os.path.abspath("%s/python/numpy/src" % scons_tools.GetBuildDir()) -+libpath = os.path.abspath("libs/python/numpy/src") - if os.environ.has_key("LD_LIBRARY_PATH"): - bp_numpy_env["ENV"]["LD_LIBRARY_PATH"] = "%s:%s" % (libpath, os.environ["LD_LIBRARY_PATH"]) - else: