Skip to content

Commit

Permalink
Do not apply the previous Windows backwards compatibility fix to old …
Browse files Browse the repository at this point in the history
…versions (#663)

I tagged the previous build too soon and had not tried building Python 2.7 versions.  Looking
at the compiler versions used to build Python (https://wiki.python.org/moin/WindowsCompilers)
it looks like 3.5 and up need the new flags.
  • Loading branch information
mkleehammer committed Feb 8, 2020
1 parent 3fd772e commit b4ea032
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,8 +167,10 @@ def get_compiler_settings(version_str):
# Unfortunately these are *hidden* settings. I guess we should be glad they actually
# made the settings.
# https://lectem.github.io/msvc/reverse-engineering/build/2019/01/21/MSVC-hidden-flags.html
settings['extra_compile_args'].append('/d2FH4-')
settings['extra_link_args'].append('/d2:-FH4-')

if sys.hexversion >= 0x03050000:
settings['extra_compile_args'].append('/d2FH4-')
settings['extra_link_args'].append('/d2:-FH4-')

settings['libraries'].append('odbc32')
settings['libraries'].append('advapi32')
Expand Down

0 comments on commit b4ea032

Please sign in to comment.