File tree 5 files changed +30
-50
lines changed 5 files changed +30
-50
lines changed File renamed without changes.
Original file line number Diff line number Diff line change 1
1
import python ;
2
- import numpy ;
3
-
2
+ # import numpy ;
3
+ import regex ;
4
4
using python ;
5
5
6
6
libraries = ;
7
7
8
- #How will the probe command be called ?
9
-
10
8
if [ python.configured ]
11
9
{
12
10
@@ -17,6 +15,20 @@ project boost/numpy
17
15
18
16
lib boost_python ;
19
17
18
+ rule numpy-includes ( properties * )
19
+ {
20
+ import feature ;
21
+ local python-interpreter = [ feature.get-values python.interpreter : $(properties) ] ;
22
+ if $(python-interpreter)
23
+ {
24
+ local full-cmd =
25
+ $(python-interpreter)" -c \"from numpy.distutils import misc_util; print ':'.join(misc_util.get_numpy_include_dirs())\" " ;
26
+ local output = [ SHELL $(full-cmd) ] ;
27
+ local includes = [ regex.split $(output) ":" ] ;
28
+ return <include>$(includes) ;
29
+ }
30
+ }
31
+
20
32
lib boost_numpy
21
33
: # sources
22
34
dtype.cpp
@@ -29,8 +41,11 @@ lib boost_numpy
29
41
<library>/python//python_for_extensions
30
42
#<library>/boost/python//boost_python
31
43
<library>boost_python
44
+ <conditional>@numpy-includes
32
45
: # default build
33
46
<link>shared
47
+ : # usage requirements
48
+ <conditional>@numpy-includes
34
49
;
35
50
36
51
libraries += boost_numpy ;
Original file line number Diff line number Diff line change 1
- import numpy ;
2
-
1
+ import testing ;
2
+ import python ;
3
3
4
4
use-project /boost/numpy : ../src ;
5
- project /boost/numpy/test
6
- : requirements
7
- # Why isn't this provided by 'using python' ?
8
- #<include>/usr/include/python2.7
9
- ;
5
+ project /boost/numpy/test ;
10
6
7
+ rule numpy-test ( name : sources * : requirements * )
8
+ {
9
+ sources ?= $(name).py $(name)_mod.cpp ;
10
+ return [ testing.make-test run-pyd : $(sources) /boost/numpy//boost_numpy
11
+ : $(requirements) : $(name) ] ;
12
+ }
11
13
12
14
test-suite numpy
13
15
:
14
16
15
- [ numpy. numpy-test templates ]
16
- [ numpy. numpy-test ufunc ]
17
+ [ numpy-test templates ]
18
+ [ numpy-test ufunc ]
17
19
18
20
;
Load Diff This file was deleted.
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments