mirror of https://github.com/mamba-org/mamba.git
fix setup.py
This commit is contained in:
parent
091e270782
commit
84cb113ce4
14
setup.py
14
setup.py
|
@ -63,14 +63,15 @@ class BuildExt(build_ext):
|
|||
'unix': ['-std=c++17', '-march=core-avx2', '-O3'],
|
||||
}
|
||||
|
||||
if sys.platform == 'darwin':
|
||||
c_opts['unix'] += ['-stdlib=libc++', '-mmacosx-version-min=10.7']
|
||||
if not has_flag(self.compiler, '-std=c++17'):
|
||||
c_opts.remove('-std=c++17')
|
||||
c_opts.append('-std=c++1z')
|
||||
|
||||
def build_extensions(self):
|
||||
ct = self.compiler.compiler_type
|
||||
|
||||
if sys.platform == 'darwin':
|
||||
c_opts['unix'] += ['-stdlib=libc++', '-mmacosx-version-min=10.7']
|
||||
if not has_flag(self.compiler, '-std=c++17'):
|
||||
c_opts.remove('-std=c++17')
|
||||
c_opts.append('-std=c++1z')
|
||||
|
||||
opts = self.c_opts.get(ct, [])
|
||||
if ct == 'unix':
|
||||
opts.append('-DVERSION_INFO="%s"' % self.distribution.get_version())
|
||||
|
@ -78,6 +79,7 @@ class BuildExt(build_ext):
|
|||
opts.append('-fvisibility=hidden')
|
||||
elif ct == 'msvc':
|
||||
opts.append('/DVERSION_INFO=\\"%s\\"' % self.distribution.get_version())
|
||||
|
||||
for ext in self.extensions:
|
||||
ext.extra_compile_args = opts
|
||||
build_ext.build_extensions(self)
|
||||
|
|
Loading…
Reference in New Issue