| --- 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), |
| --- h5py-2.10.0/setup_configure.py.orig 2019-10-28 06:39:22.882866000 +0300 |
| +++ h5py-2.10.0/setup_configure.py 2019-10-28 06:45:46.958833800 +0300 |
| @@ -200,8 +200,12 @@ |
| regexp = re.compile(r'^libhdf5.dylib') |
| elif sys.platform.startswith('win') or \ |
| sys.platform.startswith('cygwin'): |
| - default_path = 'hdf5.dll' |
| - regexp = re.compile(r'^hdf5.dll') |
| + if 'GCC' in sys.version: |
| + default_path = 'libhdf5-0.dll' |
| + regexp = re.compile(r'^libhdf5-[0-9].dll') |
| + else: |
| + default_path = 'hdf5.dll' |
| + regexp = re.compile(r'^hdf5.dll') |
| else: |
| default_path = 'libhdf5.so' |
| regexp = re.compile(r'^libhdf5.so') |