File tree Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -30,7 +30,17 @@ def main():
30
30
# lldb's python lib will be put in the correct place for python to find it.
31
31
# If not, you'll have to use lldb -P or lldb -print-script-interpreter-info
32
32
# to figure out where it is.
33
- print (relpath_nodots (sysconfig .get_path ("platlib" ), sys .prefix ))
33
+ try :
34
+ print (relpath_nodots (sysconfig .get_path ("platlib" ), sys .prefix ))
35
+ except ValueError :
36
+ # Try to fall back to something reasonable if sysconfig's platlib
37
+ # is outside of sys.prefix
38
+ if os .name == 'posix' :
39
+ print ('lib/python%d.%d/site-packages' % sys .version_info [:2 ])
40
+ elif os .name == 'nt' :
41
+ print ('Lib\\ site-packages' )
42
+ else :
43
+ raise
34
44
elif args .variable_name == "LLDB_PYTHON_EXE_RELATIVE_PATH" :
35
45
tried = list ()
36
46
exe = sys .executable
@@ -57,4 +67,4 @@ def main():
57
67
parser .error (f"unknown variable { args .variable_name } " )
58
68
59
69
if __name__ == '__main__' :
60
- main ()
70
+ main ()
You can’t perform that action at this time.
0 commit comments