summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Cournapeau <cournape@gmail.com>2011-03-16 05:51:50 -0700
committerDavid Cournapeau <cournape@gmail.com>2011-08-29 00:32:24 +0200
commit1566df7351a7261101703d152cfbe51fa4bd8e2b (patch)
tree9298c75a8d476dc5f88ec4aeeda46eca48dab4a7
parent37396fc97b78bbf30e79c6651c40f5aed5b26808 (diff)
downloadnumpy-1566df7351a7261101703d152cfbe51fa4bd8e2b.tar.gz
ENH: remove temporary hacks for recurse path settings.
-rw-r--r--numpy/core/bscript10
-rw-r--r--numpy/fft/bscript14
-rw-r--r--numpy/lib/bscript20
-rw-r--r--numpy/linalg/bscript14
-rw-r--r--numpy/random/bscript14
5 files changed, 8 insertions, 64 deletions
diff --git a/numpy/core/bscript b/numpy/core/bscript
index ff05ca825..a177e57cd 100644
--- a/numpy/core/bscript
+++ b/numpy/core/bscript
@@ -357,14 +357,6 @@ from os.path import join as pjoin
@pre_build()
def pbuild(context):
bld = context.waf_context
- # FIXME: bento command's context should have API so that subclasses can
- # customize recurse behavior
- # XXX: there is a risk of confusion between waf Node class and our own:
- # mixing them is a big no no, and may cause very hard to debug issues.
- # Find a solution
- old_path = bld.path
- bld.path = old_path.find_dir(context.local_node.path_from(context.top_node))
- assert bld.path.__class__ == old_path.__class__
def builder(bld, library):
# FIXME: hack to build static library that can be linked into a dlopen-able
@@ -449,5 +441,3 @@ def pbuild(context):
source=extension.sources,
use="CBLAS")
context.register_builder("_dotblas", build_dotblas)
-
- bld.path = old_path
diff --git a/numpy/fft/bscript b/numpy/fft/bscript
index a0d969e02..2c6a0fe1e 100644
--- a/numpy/fft/bscript
+++ b/numpy/fft/bscript
@@ -7,22 +7,12 @@ from bento.commands.hooks \
@pre_build()
def build(context):
bld = context.waf_context
- old_path = bld.path
- bld.path = old_path.find_dir(context.local_node.path_from(context.top_node))
- assert bld.path.__class__ == old_path.__class__
-
- # FIXME: there has to be a better way to refer to numpy/core include
- includes = [
- os.path.join(bld.srcnode.path_from(bld.path), "numpy/core"),
- os.path.join(bld.srcnode.path_from(bld.path), "numpy/core/include"),
- os.path.join(bld.srcnode.path_from(bld.path), "numpy/core/include/numpy"),
- os.path.join(bld.srcnode.path_from(bld.path), "numpy/core/src/private")]
def build(bld, extension):
+ includes = ["../core/include", "../core/include/numpy", "../core",
+ "../core/src/private"]
bld(features="c cshlib pyext",
target=extension.name,
source=extension.sources,
includes=includes)
context.register_builder("fftpack_lite", build)
-
- bld.path = old_path
diff --git a/numpy/lib/bscript b/numpy/lib/bscript
index 03e36ce31..f72d73f67 100644
--- a/numpy/lib/bscript
+++ b/numpy/lib/bscript
@@ -7,27 +7,11 @@ from bento.commands.hooks \
@pre_build()
def pbuild(context):
bld = context.waf_context
- # FIXME: bento command's context should have API so that subclasses can
- # customize recurse behavior
- # XXX: there is a risk of confusion between waf Node class and our own:
- # mixing them is a big no no, and may cause very hard to debug issues.
- # Find a solution
- old_path = bld.path
- bld.path = old_path.find_dir(context.local_node.path_from(context.top_node))
- assert bld.path.__class__ == old_path.__class__
-
- # FIXME: there has to be a better way to refer to numpy/core include
- includes = [
- os.path.join(bld.srcnode.path_from(bld.path), "numpy/core"),
- os.path.join(bld.srcnode.path_from(bld.path), "numpy/core/include"),
- os.path.join(bld.srcnode.path_from(bld.path), "numpy/core/include/numpy"),
- os.path.join(bld.srcnode.path_from(bld.path), "numpy/core/src/private")]
-
def builder_compiled_base(bld, extension):
+ includes = ["../core/include", "../core/include/numpy", "../core",
+ "../core/src/private"]
bld(features="c cshlib pyext",
target=extension.name,
includes=includes,
source=extension.sources)
context.register_builder("_compiled_base", builder_compiled_base)
-
- bld.path = old_path
diff --git a/numpy/linalg/bscript b/numpy/linalg/bscript
index ade32a932..828e226e8 100644
--- a/numpy/linalg/bscript
+++ b/numpy/linalg/bscript
@@ -7,16 +7,6 @@ from bento.commands.hooks \
@pre_build()
def pbuild(context):
bld = context.waf_context
- old_path = bld.path
- bld.path = old_path.find_dir(context.local_node.path_from(context.top_node))
- assert bld.path.__class__ == old_path.__class__
-
- # FIXME: there has to be a better way to refer to numpy/core include
- includes = [
- os.path.join(bld.srcnode.path_from(bld.path), "numpy/core"),
- os.path.join(bld.srcnode.path_from(bld.path), "numpy/core/include"),
- os.path.join(bld.srcnode.path_from(bld.path), "numpy/core/include/numpy"),
- os.path.join(bld.srcnode.path_from(bld.path), "numpy/core/src/private")]
def build_lapack_lite(bld, extension):
kw = {}
@@ -26,10 +16,10 @@ def pbuild(context):
extension.sources.pop(extension.sources.index(s))
kw["uselib"] = "LAPACK"
+ includes = ["../core/include", "../core/include/numpy", "../core",
+ "../core/src/private"]
bld(features="c cshlib pyext",
target=extension.name,
source=extension.sources,
includes=includes, **kw)
context.register_builder("lapack_lite", build_lapack_lite)
-
- bld.path = old_path
diff --git a/numpy/random/bscript b/numpy/random/bscript
index 3c0d2990b..05c54562d 100644
--- a/numpy/random/bscript
+++ b/numpy/random/bscript
@@ -7,26 +7,16 @@ from bento.commands.hooks \
@pre_build()
def build(context):
bld = context.waf_context
- old_path = bld.path
- bld.path = old_path.find_dir(context.local_node.path_from(context.top_node))
- assert bld.path.__class__ == old_path.__class__
-
if os.name == 'nt':
raise NotImplementedError("Check for wincrypt stuff")
raise NotImplementedError("Check for mingw time workaround stuff")
- includes = [
- os.path.join(bld.srcnode.path_from(bld.path), "numpy/core"),
- os.path.join(bld.srcnode.path_from(bld.path), "numpy/core/include"),
- os.path.join(bld.srcnode.path_from(bld.path), "numpy/core/include/numpy"),
- os.path.join(bld.srcnode.path_from(bld.path), "numpy/core/src/private")]
-
def builder(bld, extension):
+ includes = ["../core/include", "../core/include/numpy", "../core",
+ "../core/src/private"]
bld(features="c cshlib pyext",
target=extension.name,
source=extension.sources,
includes=includes)
context.register_builder("mtrand", builder)
-
- bld.path = old_path