File tree Expand file tree Collapse file tree 1 file changed +14
-6
lines changed Expand file tree Collapse file tree 1 file changed +14
-6
lines changed Original file line number Diff line number Diff line change @@ -366,14 +366,22 @@ def get_python_module_path(options):
366366 "Python" ,
367367 "lldb" )
368368 else :
369- from distutils .sysconfig import get_python_lib
369+ if sys .version_info .major == 3 and sys .version_info .minor >= 12 :
370+ from sysconfig import get_path
371+
372+ if options .prefix is not None :
373+ module_path = get_path ("platlib" , vars = {"prefix" : options .prefix })
374+ else :
375+ module_path = get_path ("platlib" )
370376
371- if options .prefix is not None :
372- module_path = get_python_lib (True , False , options .prefix )
373377 else :
374- module_path = get_python_lib (True , False )
375- return os .path .normcase (
376- os .path .join (module_path , "lldb" ))
378+ from distutils .sysconfig import get_python_lib
379+
380+ if options .prefix is not None :
381+ module_path = get_python_lib (True , False , options .prefix )
382+ else :
383+ module_path = get_python_lib (True , False )
384+ return os .path .normcase (os .path .join (module_path , "lldb" ))
377385
378386
379387def main (options ):
You can’t perform that action at this time.
0 commit comments