@@ -31,6 +31,8 @@ def run(self):
31
31
32
32
cmdclass ['sdist' ] = cython_sdist
33
33
34
+ import numpy
35
+ ext_include_dirs = [numpy .get_include (),]
34
36
setup (
35
37
name = 'spartan' ,
36
38
version = '0.06' ,
@@ -65,10 +67,15 @@ def run(self):
65
67
'spartan.array' ],
66
68
ext_modules = [
67
69
Extension ('spartan.core' , ['spartan/core' + suffix ]),
68
- Extension ('spartan.examples.netflix_core' , ['spartan/examples/netflix_core' + suffix ]),
69
- Extension ('spartan.examples.cf.helper' , ['spartan/examples/cf/helper' + suffix ]),
70
+ Extension ('spartan.examples.netflix_core' ,
71
+ ['spartan/examples/netflix_core' + suffix ],
72
+ include_dirs = ext_include_dirs ,),
73
+ Extension ('spartan.examples.cf.helper' ,
74
+ ['spartan/examples/cf/helper' + suffix ],
75
+ include_dirs = ext_include_dirs ,),
70
76
Extension ('spartan.rpc.serialization_buffer' ,
71
- ['spartan/rpc/serialization_buffer' + suffix ]),
77
+ ['spartan/rpc/serialization_buffer' + suffix ],
78
+ include_dirs = ext_include_dirs ,),
72
79
Extension ('spartan.cloudpickle' , ['spartan/cloudpickle' + suffix ]),
73
80
Extension ('spartan.rpc.serialization' ,
74
81
['spartan/rpc/serialization' + suffix ],
@@ -78,13 +85,17 @@ def run(self):
78
85
Extension ('spartan.rpc.rlock' ,
79
86
['spartan/rpc/rlock' + suffix ], language = "c++" ),
80
87
Extension ('spartan.examples.sklearn.util.graph_shortest_path' ,
81
- ['spartan/examples/sklearn/util/graph_shortest_path' + suffix ]),
88
+ ['spartan/examples/sklearn/util/graph_shortest_path' + suffix ],
89
+ include_dirs = ext_include_dirs ,),
82
90
Extension ('spartan.array.sparse' ,
83
91
['spartan/array/sparse' + suffix ],
84
92
language = 'c++' ,
85
- extra_compile_args = ["-std=c++0x" ],
93
+ include_dirs = ext_include_dirs ,
94
+ extra_compile_args = ["-std=c++11" ],
86
95
extra_link_args = ["-std=c++11" ]),
87
- Extension ('spartan.array.extent' , ['spartan/array/extent' + suffix ]),
96
+ Extension ('spartan.array.extent' ,
97
+ ['spartan/array/extent' + suffix ],
98
+ include_dirs = ext_include_dirs ,),
88
99
Extension ('spartan.array.tile' , ['spartan/array/tile' + suffix ]),
89
100
Extension ('spartan.expr.operator.tiling' ,
90
101
sources = ['spartan/expr/operator/tiling.cc' ],
0 commit comments