File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change 24
24
with open (os .path .join (ROOT , 'README.md' ), encoding = "utf-8" ) as f :
25
25
README = f .read ()
26
26
27
+ # add platform dependant optional compilation argument
28
+ opt_arg = ["-O3" ]
29
+ import platform
30
+ if platform .system ()== 'Darwin' :
31
+ if platform .release ()== '18.0.0' :
32
+ opt_arg .append ("-stdlib=libc++" ) # correspond to a compilation problem with Mojave and XCode 10
27
33
28
34
setup (name = 'POT' ,
29
35
version = __version__ ,
39
45
sources = ["ot/lp/emd_wrap.pyx" , "ot/lp/EMD_wrapper.cpp" ], # the Cython source and
40
46
# additional C++ source files
41
47
language = "c++" , # generate and compile C++ code,
42
- include_dirs = [numpy .get_include (),os .path .join (ROOT ,'ot/lp' )])),
48
+ include_dirs = [numpy .get_include (),os .path .join (ROOT ,'ot/lp' )],
49
+ extra_compile_args = opt_arg
50
+ )),
43
51
platforms = ['linux' ,'macosx' ,'windows' ],
44
52
download_url = 'https://github.com/rflamary/POT/archive/{}.tar.gz' .format (__version__ ),
45
53
license = 'MIT' ,
You can’t perform that action at this time.
0 commit comments