forked from numpy/numpy
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
FEAT: numpy.core and numpy.lib both build
- Loading branch information
Showing
6 changed files
with
306 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
Library: | ||
Extension: _compiled_base | ||
Sources: | ||
src/_compiled_base.c |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
import os | ||
|
||
from bento.commands.hooks \ | ||
import \ | ||
pre_build | ||
|
||
@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): | ||
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 |