File tree Expand file tree Collapse file tree 2 files changed +8
-2
lines changed
src/debugpy/_vendored/pydevd/pydevd_attach_to_process/linux_and_mac Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change 22import argparse
33import os
44import platform
5+ import re
56
67def build_pydevd_binaries (force : bool ):
78 os .environ ["PYDEVD_USE_CYTHON" ] = "yes"
@@ -25,7 +26,12 @@ def build_pydevd_binaries(force: bool):
2526 if not os .path .exists (os .path .join (pydevd_attach_to_process_root , "attach_amd64.dll" )) or force :
2627 os .system (os .path .join (pydevd_attach_to_process_root , "windows" , "compile_windows.bat" ))
2728 elif platform .system () == "Linux" :
28- if not os .path .exists (os .path .join (pydevd_attach_to_process_root , "attach_linux_amd64.so" )) or force :
29+ arch = platform .machine ()
30+ if re .match (r'^i.*86$' , arch ):
31+ arch = 'x86'
32+ if arch == "x86_64" :
33+ arch = "amd64"
34+ if not os .path .exists (os .path .join (pydevd_attach_to_process_root , f"attach_linux_{ arch } .so" )) or force :
2935 os .system (os .path .join (pydevd_attach_to_process_root , "linux_and_mac" , "compile_linux.sh" ))
3036 elif platform .system () == "Darwin" :
3137 if not os .path .exists (os .path .join (pydevd_attach_to_process_root , "attach.dylib" )) or force :
Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ ARCH="$(uname -m)"
44case $ARCH in
55 i* 86) SUFFIX=x86;;
66 x86_64* ) SUFFIX=amd64;;
7- * ) echo >&2 " unsupported: $ARCH " ; exit 1 ;;
7+ * ) echo >&2 " unsupported: $ARCH , this script may not work " ;;
88esac
99
1010SRC=" $( dirname " $0 " ) /.."
You can’t perform that action at this time.
0 commit comments