Skip to content

Commit 49d7f9e

Browse files
Prerak SinghPrerak Singh
authored andcommitted
bug fix
1 parent ccb8b07 commit 49d7f9e

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

pydatastructs/graphs/_extensions.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
from setuptools import Extension
22
import os
3+
import sys
34

45
project = 'pydatastructs'
56

@@ -18,19 +19,23 @@
1819

1920
include_dir = os.path.abspath(os.path.join(project, 'utils', '_backend', 'cpp'))
2021

22+
extra_compile_args = ["-std=c++17"]
23+
if sys.platform == "darwin":
24+
extra_compile_args.append("-mmacosx-version-min=10.13")
25+
2126
extensions = [
2227
Extension(
2328
graph,
2429
sources=graph_sources,
2530
include_dirs=[include_dir],
2631
language="c++",
27-
extra_compile_args=["-std=c++17", "-mmacosx-version-min=10.13"],
32+
extra_compile_args=extra_compile_args,
2833
),
2934
Extension(
3035
algorithms,
3136
sources=algorithms_sources,
3237
include_dirs=[include_dir],
3338
language="c++",
34-
extra_compile_args=["-std=c++17", "-mmacosx-version-min=10.13"],
39+
extra_compile_args=extra_compile_args,
3540
),
3641
]

pydatastructs/utils/_extensions.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,11 @@
3636
Extension(
3737
nodes,
3838
sources=nodes_sources,
39-
extra_compile_args=["-std=c++17", "-mmacosx-version-min=10.13"],
39+
extra_compile_args=["-std=c++17"],
4040
),
4141
Extension(
4242
graph_utils,
4343
sources=graph_utils_sources,
44-
extra_compile_args=["-std=c++17", "-mmacosx-version-min=10.13"],
44+
extra_compile_args=["-std=c++17"],
4545
),
4646
]

0 commit comments

Comments
 (0)