Skip to content

Commit 48689ec

Browse files
committed
Support MAC OS.
1 parent ce3bf7f commit 48689ec

File tree

3 files changed

+19
-8
lines changed

3 files changed

+19
-8
lines changed

setup.py

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ def run(self):
3131

3232
cmdclass['sdist'] = cython_sdist
3333

34+
import numpy
35+
ext_include_dirs = [numpy.get_include(),]
3436
setup(
3537
name='spartan',
3638
version='0.06',
@@ -65,10 +67,15 @@ def run(self):
6567
'spartan.array' ],
6668
ext_modules = [
6769
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,),
7076
Extension('spartan.rpc.serialization_buffer',
71-
['spartan/rpc/serialization_buffer' + suffix]),
77+
['spartan/rpc/serialization_buffer' + suffix],
78+
include_dirs=ext_include_dirs,),
7279
Extension('spartan.cloudpickle', ['spartan/cloudpickle' + suffix]),
7380
Extension('spartan.rpc.serialization',
7481
['spartan/rpc/serialization' + suffix],
@@ -78,13 +85,17 @@ def run(self):
7885
Extension('spartan.rpc.rlock',
7986
['spartan/rpc/rlock' + suffix], language="c++"),
8087
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,),
8290
Extension('spartan.array.sparse',
8391
['spartan/array/sparse' + suffix],
8492
language='c++',
85-
extra_compile_args=["-std=c++0x"],
93+
include_dirs=ext_include_dirs,
94+
extra_compile_args=["-std=c++11"],
8695
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,),
8899
Extension('spartan.array.tile', ['spartan/array/tile' + suffix]),
89100
Extension('spartan.expr.operator.tiling',
90101
sources=['spartan/expr/operator/tiling.cc'],

spartan/array/unordered_map.pxd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
from libcpp.utility cimport pair
22

3-
cdef extern from "<tr1/unordered_map>" namespace "std::tr1":
3+
cdef extern from "<unordered_map>" namespace "std" nogil:
44
cdef cppclass unordered_map[T, U]:
55
cppclass iterator:
66
pair[T, U]& operator*() nogil

spartan/rpc/unordered_set.pxd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
from libcpp.utility cimport pair
22

3-
cdef extern from "<tr1/unordered_set>" namespace "std::tr1":
3+
cdef extern from "<unordered_set>" namespace "std" nogil:
44
cdef cppclass unordered_set[T]:
55
cppclass iterator:
66
T& operator*() nogil

0 commit comments

Comments
 (0)