Skip to content

Commit

Permalink
win32: Don't include portable stdint on 3.4/VS2010.
Browse files Browse the repository at this point in the history
  • Loading branch information
dw committed Apr 26, 2014
1 parent 941d265 commit 73bb299
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
File renamed without changes.
9 changes: 8 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,15 @@
# Python.h everywhere since it has a portable definition of ssize_t, which
# inttypes.h and stdint.h lack, and to avoid having to modify the LMDB source
# code. Advapi32 is needed for LMDB's use of Windows security APIs.
p = sys.version.find('MSC v.')
msvc_ver = int(sys.version[p+6:p+10]) if p != -1 else None

if sys.platform.startswith('win'):
extra_include_dirs += ['lib/win32']
# If running on Visual Studio<=2010 we must provide <stdint.h>. Newer
# versions provide it out of the box.
if msvc_ver and not msvc_ver >= 1600:
extra_include_dirs += ['lib\\win32-stdint']
extra_include_dirs += ['lib\\win32']
extra_compile_args += [r'/FIPython.h']
libraries += ['Advapi32']

Expand Down

0 comments on commit 73bb299

Please sign in to comment.