Skip to content
This repository was archived by the owner on Sep 13, 2023. It is now read-only.

Commit 423e7be

Browse files
committed
Fix compilation with anaconda on macOS
See pandas-dev/pandas#24274 for details
1 parent ce46f48 commit 423e7be

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

setup.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
1+
import sys
2+
13
from distutils.core import setup
24
from distutils.extension import Extension
35

6+
extra_args = ["-std=c++11"]
7+
if sys.platform == "darwin":
8+
extra_args.append("-stdlib=libc++")
9+
410
noaho_module = Extension(
511
"noahong",
612
sources=[
@@ -10,8 +16,8 @@
1016
"src/array-aho.cpp",
1117
],
1218
depends=["src/array-aho.h", "src/noahong.pyx"],
13-
extra_compile_args=["-std=c++11"],
14-
extra_link_args=["-std=c++11"],
19+
extra_compile_args=extra_args,
20+
extra_link_args=extra_args,
1521
)
1622

1723
version = "0.9.7"

0 commit comments

Comments
 (0)