|
18 | 18 | # Whether to create libarrow symlinks on posix systems.
|
19 | 19 | CREATE_LIBARROW_SYMLINKS = os.environ.get("MONGO_CREATE_LIBARROW_SYMLINKS", "1")
|
20 | 20 |
|
| 21 | +# Set a default value for MACOSX_DEPLOYMENT_TARGET. |
| 22 | +os.environ.setdefault("MACOSX_DEPLOYMENT_TARGET", "10.15") |
| 23 | + |
21 | 24 |
|
22 | 25 | def query_pkgconfig(cmd):
|
23 | 26 | status, output = subprocess.getstatusoutput(cmd)
|
@@ -147,14 +150,16 @@ def append_arrow_flags(ext):
|
147 | 150 | pa.create_library_symlinks()
|
148 | 151 |
|
149 | 152 | if os.name == "posix":
|
150 |
| - ext.extra_compile_args.append("-std=c++11") |
151 |
| - |
152 |
| - # Arrow's manylinux{2010, 2014} binaries are built with gcc < 4.8 which predates CXX11 ABI |
153 |
| - # - https://uwekorn.com/2019/09/15/how-we-build-apache-arrows-manylinux-wheels.html |
154 |
| - # - https://arrow.apache.org/docs/python/extending.html#example |
155 |
| - if "std=" not in os.environ.get("CXXFLAGS", ""): |
156 |
| - ext.extra_compile_args.append("-std=c++11") |
157 |
| - ext.extra_compile_args.append("-D_GLIBCXX_USE_CXX11_ABI=0") |
| 153 | + ext.extra_compile_args.append("-std=c++17") |
| 154 | + |
| 155 | + # Arrow's manylinux{2010, 2014} binaries are built with gcc < 4.8 which predates CXX11 ABI |
| 156 | + # - https://uwekorn.com/2019/09/15/how-we-build-apache-arrows-manylinux-wheels.html |
| 157 | + # - https://arrow.apache.org/docs/python/extending.html#example |
| 158 | + if "std=" not in os.environ.get("CXXFLAGS", ""): |
| 159 | + ext.extra_compile_args.append("-D_GLIBCXX_USE_CXX11_ABI=0") |
| 160 | + |
| 161 | + elif os.name == "nt": |
| 162 | + ext.extra_compile_args.append("/std:c++17") |
158 | 163 |
|
159 | 164 |
|
160 | 165 | def get_extension_modules():
|
|
0 commit comments