@@ -45,7 +45,13 @@ while requirements:
4545 checked .add (requirement )
4646 module_version = importlib .metadata .version (re .match (r"^[\w\-]+" , requirement )[0 ])
4747 try :
48- datas_ , binaries_ , hidden_imports_ = collect_all (requirement , include_py_files = True )
48+ # Use filter to exclude problematic xgboost.testing module
49+ filter_func = lambda name : not name .startswith ("xgboost.testing" ) if requirement == "xgboost" else True
50+ datas_ , binaries_ , hidden_imports_ = collect_all (
51+ requirement ,
52+ include_py_files = True ,
53+ filter_submodules = filter_func
54+ )
4955 except (ImportError , RuntimeError ) as e :
5056 # Skip packages that fail to collect (e.g., xgboost.testing requires hypothesis)
5157 print (f"Warning: Failed to collect { requirement } : { e } " )
@@ -61,6 +67,18 @@ while requirements:
6167
6268hidden_imports = sorted ([h for h in hidden_imports if "tests" not in h .split ("." )])
6369hidden_imports = [h for h in hidden_imports if "__pycache__" not in h ]
70+
71+ # Add hdf5plugin imports to fix runtime import issues
72+ hidden_imports .extend ([
73+ "hdf5plugin.plugins.bshuf" ,
74+ "hdf5plugin.plugins.blosc" ,
75+ "hdf5plugin.plugins.blosc2" ,
76+ "hdf5plugin.plugins.lz4" ,
77+ "hdf5plugin.plugins.fcidecomp" ,
78+ "hdf5plugin.plugins.zfp" ,
79+ "hdf5plugin.plugins.zstd" ,
80+ ])
81+
6482datas = [
6583 d
6684 for d in datas
0 commit comments