Skip to content

Commit

Permalink
version info fix
Browse files Browse the repository at this point in the history
  • Loading branch information
wjblanke authored and hoffmang9 committed Nov 17, 2020
1 parent 4bed72b commit 0316d59
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 0 additions & 4 deletions python-bindings/pythonbindings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -618,11 +618,7 @@ PYBIND11_MODULE(blspy, m)
m.attr("SignatureMPL") = m.attr("G2Element");

#ifdef VERSION_INFO
#ifdef _WIN32
m.attr("__version__") = "dev";
#else
m.attr("__version__") = VERSION_INFO;
#endif
#else
m.attr("__version__") = "dev";
#endif
Expand Down
6 changes: 5 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,11 @@ def build_extensions(self):
if has_flag(self.compiler, '-fvisibility=hidden'):
opts.append('-fvisibility=hidden')
elif ct == 'msvc':
opts.append('/DVERSION_INFO=\\"%s\\"' % self.distribution.get_version())
if sys.version_info < (3,9):
ver_flag = '/DVERSION_INFO=\\"%s\\"'
else:
ver_flag = '-DVERSION_INFO="%s"'
opts.append(ver_flag % self.distribution.get_version())
for ext in self.extensions:
ext.extra_compile_args = opts
ext.extra_link_args = link_opts
Expand Down

0 comments on commit 0316d59

Please sign in to comment.