From 3f16af123e66537cc98eb827bc916090032d2dc0 Mon Sep 17 00:00:00 2001 From: Matthew Honnibal Date: Sat, 1 Dec 2018 02:36:56 +0100 Subject: [PATCH] Try to fix OSX build error --- setup.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/setup.py b/setup.py index e8bf9e8fa..61de2d1a9 100755 --- a/setup.py +++ b/setup.py @@ -155,6 +155,7 @@ def setup_package(): for mod_name in MOD_NAMES: mod_path = mod_name.replace('.', '/') + '.cpp' extra_link_args = [] + extra_compile_args = [] # ??? # Imported from patch from @mikepb # See Issue #267. Running blind here... @@ -163,10 +164,14 @@ def setup_package(): dylib_path = '/'.join(dylib_path) dylib_path = '@loader_path/%s/spacy/platform/darwin/lib' % dylib_path extra_link_args.append('-Wl,-rpath,%s' % dylib_path) + # Try to fix OSX 10.7 problem. Running blind here too. + extra_compile_args.append('-std=libc++') + extra_link_args.append('-std=libc++') ext_modules.append( Extension(mod_name, [mod_path], language='c++', include_dirs=include_dirs, - extra_link_args=extra_link_args)) + extra_link_args=extra_link_args, + extra_compile_args=extra_compile_args)) if not is_source_release(root): generate_cython(root, 'spacy')