|
|
@ -78,11 +78,13 @@ class BuildExt(build_ext): |
|
|
|
def build_extensions(self): |
|
|
|
def build_extensions(self): |
|
|
|
ct = self.compiler.compiler_type |
|
|
|
ct = self.compiler.compiler_type |
|
|
|
opts = self.c_opts.get(ct, []) |
|
|
|
opts = self.c_opts.get(ct, []) |
|
|
|
opts.append('-DVERSION_INFO="%s"' % self.distribution.get_version()) |
|
|
|
|
|
|
|
if ct == 'unix': |
|
|
|
if ct == 'unix': |
|
|
|
|
|
|
|
opts.append('-DVERSION_INFO="%s"' % self.distribution.get_version()) |
|
|
|
opts.append(cpp_flag(self.compiler)) |
|
|
|
opts.append(cpp_flag(self.compiler)) |
|
|
|
if has_flag(self.compiler, '-fvisibility=hidden'): |
|
|
|
if has_flag(self.compiler, '-fvisibility=hidden'): |
|
|
|
opts.append('-fvisibility=hidden') |
|
|
|
opts.append('-fvisibility=hidden') |
|
|
|
|
|
|
|
elif ct == 'msvc': |
|
|
|
|
|
|
|
opts.append('/DVERSION_INFO=\\"%s\\"' % self.distribution.get_version()) |
|
|
|
for ext in self.extensions: |
|
|
|
for ext in self.extensions: |
|
|
|
ext.extra_compile_args = opts |
|
|
|
ext.extra_compile_args = opts |
|
|
|
build_ext.build_extensions(self) |
|
|
|
build_ext.build_extensions(self) |
|
|
|