43 lines
1.6 KiB
Diff
43 lines
1.6 KiB
Diff
--- 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-3.3.0/setup_configure.py.orig 2021-07-14 20:32:17.516742500 +0200
|
|
+++ h5py-3.3.0/setup_configure.py 2021-07-14 20:34:00.998030600 +0200
|
|
@@ -202,8 +202,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')
|
|
if sys.version_info >= (3, 8):
|
|
# To overcome "difficulty" loading the library on windows
|
|
# https://bugs.python.org/issue42114
|