--- h5py-2.7.0/setup_build.py.orig 2017-06-16 19:33:54.858023400 +0300 +++ h5py-2.7.0/setup_build.py 2017-06-16 19:37:16.980584200 +0300 @@ -17,6 +17,7 @@ from functools import reduce import api_gen +from sysconfig import _POSIX_BUILD def localpath(*args): return op.abspath(reduce(op.join, (op.dirname(__file__),)+args)) @@ -36,7 +37,13 @@ 'define_macros' : [('H5_USE_16_API', None)] } -if sys.platform.startswith('win'): +if _POSIX_BUILD: + COMPILER_SETTINGS['define_macros'].extend([ + ('H5_USE_16_API', None), + ('_HDF5USEDLL_', None), + ('H5_BUILT_AS_DYNAMIC_LIB', None) + ]) +elif sys.platform.startswith('win'): COMPILER_SETTINGS['include_dirs'].append(localpath('windows')) COMPILER_SETTINGS['define_macros'].extend([ ('_HDF5USEDLL_', None),