summaryrefslogtreecommitdiff
path: root/setup.py
diff options
context:
space:
mode:
authorDean Moldovan <dean0x7d@gmail.com>2016-06-11 01:03:43 +0200
committerDean Moldovan <dean0x7d@gmail.com>2016-06-12 01:53:46 +0200
commit22a3c2d10f342239f90908e5beba59928622a534 (patch)
tree74f023c5cc2838a7ad1c73a5270de6cf66ed9df6 /setup.py
parentb6d1cd61b55e84583fe3505a462e3852fee8d7bd (diff)
Fix compiler error on Windows
Diffstat (limited to 'setup.py')
-rw-r--r--setup.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/setup.py b/setup.py
index d4415eb..75392c9 100644
--- a/setup.py
+++ b/setup.py
@@ -78,11 +78,13 @@ class BuildExt(build_ext):
def build_extensions(self):
ct = self.compiler.compiler_type
opts = self.c_opts.get(ct, [])
- opts.append('-DVERSION_INFO="%s"' % self.distribution.get_version())
if ct == 'unix':
+ opts.append('-DVERSION_INFO="%s"' % self.distribution.get_version())
opts.append(cpp_flag(self.compiler))
if has_flag(self.compiler, '-fvisibility=hidden'):
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)