8000
We read every piece of feedback, and take your input very seriously.
1 parent 2ed5a68 commit 7b86945Copy full SHA for 7b86945
setup.py
@@ -71,13 +71,20 @@ class BuildExt(build_ext):
71
'msvc': ['/EHsc'],
72
'unix': [],
73
}
74
+ l_opts = {
75
+ 'msvc': [],
76
+ 'unix': [],
77
+ }
78
79
if sys.platform == 'darwin':
- c_opts['unix'] += ['-stdlib=libc++', '-mmacosx-version-min=10.7']
80
+ darwin_opts = ['-stdlib=libc++', '-mmacosx-version-min=10.7']
81
+ c_opts['unix'] += darwin_opts
82
+ l_opts['unix'] += darwin_opts
83
84
def build_extensions(self):
85
ct = self.compiler.compiler_type
86
opts = self.c_opts.get(ct, [])
87
+ link_opts = self.l_opts.get(ct, [])
88
if ct == 'unix':
89
opts.append('-DVERSION_INFO="%s"' % self.distribution.get_version())
90
opts.append(cpp_flag(self.compiler))
@@ -87,6 +94,7 @@ def build_extensions(self):
94
opts.append('/DVERSION_INFO=\\"%s\\"' % self.distribution.get_version())
95
for ext in self.extensions:
96
ext.extra_compile_args = opts
97
+ ext.extra_link_args = link_opts
98
build_ext.build_extensions(self)
91
99
92
100
setup(