From dccaf3840e103a842d389c478e9bc3c26aea1631 Mon Sep 17 00:00:00 2001 From: jakirkham Date: Mon, 29 Jul 2024 14:17:59 -0700 Subject: [PATCH] Add `Library\mingw-w64` to Windows search path (#10643) --- python-package/packager/nativelib.py | 3 +++ python-package/xgboost/libpath.py | 3 +++ 2 files changed, 6 insertions(+) diff --git a/python-package/packager/nativelib.py b/python-package/packager/nativelib.py index 1852e0d2d909..1a3df2ea8989 100644 --- a/python-package/packager/nativelib.py +++ b/python-package/packager/nativelib.py @@ -138,6 +138,9 @@ def locate_or_build_libxgboost( sys_prefix / "Library", sys_prefix / "Library" / "bin", sys_prefix / "Library" / "lib", + sys_prefix / "Library" / "mingw-w64", + sys_prefix / "Library" / "mingw-w64" / "bin", + sys_prefix / "Library" / "mingw-w64" / "lib", ] sys_prefix_candidates = [ p.expanduser().resolve() for p in sys_prefix_candidates diff --git a/python-package/xgboost/libpath.py b/python-package/xgboost/libpath.py index 58c78df090ae..92d46a0bb77d 100644 --- a/python-package/xgboost/libpath.py +++ b/python-package/xgboost/libpath.py @@ -38,6 +38,9 @@ def find_lib_path() -> List[str]: os.path.join(sys.base_prefix, "Library"), os.path.join(sys.base_prefix, "Library", "bin"), os.path.join(sys.base_prefix, "Library", "lib"), + os.path.join(sys.base_prefix, "Library", "mingw-w64"), + os.path.join(sys.base_prefix, "Library", "mingw-w64", "bin"), + os.path.join(sys.base_prefix, "Library", "mingw-w64", "lib"), ] ) dll_path = [os.path.join(p, "xgboost.dll") for p in dll_path]