Support shared library in system path. (#6362)

This commit is contained in:
Jiaming Yuan
2020-11-10 16:04:25 +08:00
committed by GitHub
parent 184e2eac7d
commit e65e3cf36e
3 changed files with 48 additions and 1 deletions

View File

@@ -24,7 +24,11 @@ def find_lib_path():
os.path.join(curr_path, 'lib'),
# editable installation, no copying is performed.
os.path.join(curr_path, os.path.pardir, os.path.pardir, 'lib'),
# use libxgboost from a system prefix, if available. This should be the last
# option.
os.path.join(sys.prefix, 'lib'),
]
if sys.platform == 'win32':
if platform.architecture()[0] == '64bit':
dll_path.append(