You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
lldb/bindings/python/prepare_binding_python.py imports distutils which used to be a part of Python standard libraries, but was deprecated long ago and finally removed in Python 3.12. Thus we'll get the following error if we tried to build with a vallina Python 3.12 install:
FAILED: tools/lldb/bindings/python/LLDBWrapPython.cpp tools/lldb/bindings/python/lldb.py E:/swift-build/5/tools/lldb/bindings/python/LLDBWrapPython.cpp E:/swift-build/5/tools/lldb/bindings/python/lldb.py
C:\Windows\system32\cmd.exe /C "cd /D E:\swift-build\5\tools\lldb\bindings\python && E:\swift-build\python\3.12.6\amd64\Python312\python.exe C:/Users/stevapple/Developer/llvm-project/lldb/bindings/prepare_bindings.py --srcRoot=C:/Users/stevapple/Developer/llvm-project/lldb --buildRoot=E:/swift-build/5/tools/lldb --targetDir=E:/swift-build/5/tools/lldb/bindings/python --cfgBldDir=E:/swift-build/5/tools/lldb/bindings/python --prefix=E:/swift-build/5 --use-static-binding"
Traceback (most recent call last):
File "C:\Users\stevapple\Developer\llvm-project\lldb\bindings\prepare_bindings.py", line 290, in <module>
main(sys.argv[1:])
File "C:\Users\stevapple\Developer\llvm-project\lldb\bindings\prepare_bindings.py", line 285, in main
prepare_all_bindings(options)
File "C:\Users\stevapple\Developer\llvm-project\lldb\bindings\prepare_bindings.py", line 74, in prepare_all_bindings
prepare_binding_for_language(bindings_dir, script_lang, options)
File "C:\Users\stevapple\Developer\llvm-project\lldb\bindings\prepare_bindings.py", line 49, in prepare_binding_for_language
module.main(options)
File "c:\users\stevapple\developer\llvm-project\lldb\bindings\python\prepare_binding_python.py", line 443, in main
python_module_path = get_python_module_path(options)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "c:\users\stevapple\developer\llvm-project\lldb\bindings\python\prepare_binding_python.py", line 369, in get_python_module_path
from distutils.sysconfig import get_python_lib
ModuleNotFoundError: No module named 'distutils'
ninja: build stopped: subcommand failed.
We should consider replacing it with a modernized module, though they're most likely not included in the standard libraries
lldb/bindings/python/prepare_binding_python.py
importsdistutils
which used to be a part of Python standard libraries, but was deprecated long ago and finally removed in Python 3.12. Thus we'll get the following error if we tried to build with a vallina Python 3.12 install:We should consider replacing it with a modernized module, though they're most likely not included in the standard libraries
FYI Upstream LLVM's choice was
packaging
.The text was updated successfully, but these errors were encountered: