Skip to content

Commit 42d833f

Browse files
committed
Use get_python_lib to look for lldb python lib dir.
1 parent 384673b commit 42d833f

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

test/lit.site.cfg.in

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
import os
1414
import platform
1515
import sys
16+
from distutils.sysconfig import get_python_lib
1617

1718
config.llvm_src_root = "@LLVM_MAIN_SRC_DIR@"
1819
config.llvm_obj_root = "@LLVM_BINARY_DIR@"
@@ -81,10 +82,8 @@ config.available_features.add("CMAKE_GENERATOR=@CMAKE_GENERATOR@")
8182

8283
if "@LLDB_ENABLE@" == "TRUE":
8384
config.available_features.add('lldb')
84-
for root, dirs, files in os.walk("@LLDB_BUILD_DIR@"):
85-
if root.endswith("site-packages"):
86-
config.substitutions.append(('%lldb-python-path', root))
87-
break
85+
python_lib_dir = get_python_lib(True, False, "@LLDB_BUILD_DIR@")
86+
config.substitutions.append(('%lldb-python-path', python_lib_dir))
8887

8988
# Let the main config do the real work.
9089
if config.test_exec_root is None:

0 commit comments

Comments
 (0)