Enable Installation of Python Package with System lib in a Virtual Environment (#9349)

This commit is contained in:
Oliver Holworthy
2023-07-04 22:46:17 +01:00
committed by GitHub
parent bb2de1fd5d
commit 6c9c8a9001
4 changed files with 47 additions and 6 deletions

View File

@@ -132,8 +132,8 @@ def locate_or_build_libxgboost(
if build_config.use_system_libxgboost:
# Find libxgboost from system prefix
sys_prefix = pathlib.Path(sys.prefix).absolute().resolve()
libxgboost_sys = sys_prefix / "lib" / _lib_name()
sys_base_prefix = pathlib.Path(sys.base_prefix).absolute().resolve()
libxgboost_sys = sys_base_prefix / "lib" / _lib_name()
if not libxgboost_sys.exists():
raise RuntimeError(
f"use_system_libxgboost was specified but {_lib_name()} is "