From a85671e1afa38067fdc10d829841bf0607240e68 Mon Sep 17 00:00:00 2001 From: Kumi Date: Fri, 9 Feb 2024 14:43:35 +0100 Subject: [PATCH] Updated submodule commands and linked against hdf5_cpp library Enabled the use of shell in 'git submodule' commands to ensure cross-platform compatibility in the setup process. Also revised the linked libraries for the 'limedriver.binding' extension, replacing 'hdf5' with 'hdf5_cpp' to properly utilize the C++ HDF5 library interface. This change is expected to enhance compatibility and performance when interacting with HDF5 files. --- setup.py | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/setup.py b/setup.py index 00ad202..cbec6b7 100644 --- a/setup.py +++ b/setup.py @@ -21,19 +21,15 @@ class BuildExtCommand(build_ext): super().run() def clone_limedriver(self): - subprocess.check_call(['git', 'submodule', 'init']) - subprocess.check_call(['git', 'submodule', 'update']) - - def build_limedriver(self): - subprocess.check_call(['./configure'], cwd='extern/limedriver') - subprocess.check_call(['make'], cwd='extern/limedriver') + subprocess.check_call(['git', 'submodule', 'init'], shell=True) + subprocess.check_call(['git', 'submodule', 'update'], shell=True) ext_modules = [ Extension( 'limedriver.binding', sources=['src/limedriver/limedriver.pyx', 'extern/limedriver/src/limedriver.cpp'], include_dirs=["extern/limedriver/src/"], - libraries=["LimeSuite", "hdf5"], + libraries=["LimeSuite", "hdf5_cpp"], language="c++", ), ]