Skip to content

Commit

Permalink
BSE-4403: Fix hdf5 import (#116)
Browse files Browse the repository at this point in the history
  • Loading branch information
IsaacWarren authored Jan 6, 2025
1 parent 284925b commit 5faf05f
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
7 changes: 5 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -592,10 +592,13 @@ if (NOT (CMAKE_BUILD_TYPE STREQUAL "Release") AND NOT DEFINED ENV{BODO_SKIP_CPP_
"bodo/tests/test_theta_sketches.cpp")
endif()

set(NO_HDF5 "$ENV{NO_HDF5}")
if(NOT NO_HDF5)
if($"ENV{NO_HDF5}" STREQUAL "1")
set(NO_HDF5 TRUE)
else()
list(APPEND sources_list "bodo/io/_hdf5.cpp")
set(NO_HDF5 FALSE)
endif()
cmake_print_variables(NO_HDF5)

python_add_library(ext MODULE WITH_SOABI "${sources_list}")

Expand Down
2 changes: 1 addition & 1 deletion bodo/io/h5_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
import h5py
import llvmlite.binding as ll

from bodo.io import _hdf5
from bodo.ext import _hdf5

ll.add_symbol("h5_open", _hdf5.h5_open)
ll.add_symbol("h5_open_dset_or_group_obj", _hdf5.h5_open_dset_or_group_obj)
Expand Down
2 changes: 1 addition & 1 deletion bodo/utils/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -1489,7 +1489,7 @@ def has_supported_h5py() -> bool:
try:
import h5py # noqa

from bodo.io import _hdf5 # noqa
from bodo.ext import _hdf5 # noqa

# TODO: make sure h5py/hdf5 supports parallel
except ImportError:
Expand Down

0 comments on commit 5faf05f

Please sign in to comment.