2
0
mirror of https://github.com/boostorg/python.git synced 2026-01-24 06:02:14 +00:00

boost.python numpy support - improvements to build system

This commit is contained in:
Jim Bosch
2010-05-18 06:59:41 +00:00
parent c3d186e0bf
commit 99d3a54ad5
4 changed files with 252 additions and 59 deletions

View File

@@ -1,5 +1,5 @@
Import("env")
Import("bp_numpy_env")
lib = env.SharedLibrary("boost_python_numpy", Glob("*.cpp"))
lib = bp_numpy_env.SharedLibrary("boost_python_numpy", Glob("*.cpp"))
Return("lib")

View File

@@ -1,17 +1,8 @@
Import("env")
import os
Import("bp_numpy_env")
test_env = env.Clone()
test_env.Append(LIBS="boost_python_numpy")
tests = ("ufunc",)
test_mods = [test_env.SharedLibrary("%s_mod" % k, "%s_mod.cpp" % k, SHLIBPREFIX="")
for k in tests]
os.path.abspath(".")
test_runs = [test_env.Command(".%s" % name, [mod,"%s.py" % name],
"cd %s; python %s.py" % (os.path.abspath("."), name))
for name, mod in zip(tests, test_mods)]
test = Alias("test",[test_runs])
ufunc_mod = bp_numpy_env.SharedLibrary("ufunc_mod", "ufunc_mod.cpp", SHLIBPREFIX="",
LIBS="boost_python_numpy")
ufunc_test = bp_numpy_env.PythonUnitTest("ufunc.py", ufunc_mod)
test = ufunc_test
Return("test")