mirror of
https://github.com/microsoft/debugpy.git
synced 2025-12-23 08:48:12 +00:00
Merge 3abf4c82f7 into 698499e9ec
This commit is contained in:
commit
9a412a49c5
2 changed files with 8 additions and 2 deletions
|
|
@ -2,6 +2,7 @@
|
|||
import argparse
|
||||
import os
|
||||
import platform
|
||||
import re
|
||||
|
||||
def build_pydevd_binaries(force: bool):
|
||||
os.environ["PYDEVD_USE_CYTHON"] = "yes"
|
||||
|
|
@ -25,7 +26,12 @@ def build_pydevd_binaries(force: bool):
|
|||
if not os.path.exists(os.path.join(pydevd_attach_to_process_root, "attach_amd64.dll")) or force:
|
||||
os.system(os.path.join(pydevd_attach_to_process_root, "windows", "compile_windows.bat"))
|
||||
elif platform.system() == "Linux":
|
||||
if not os.path.exists(os.path.join(pydevd_attach_to_process_root, "attach_linux_amd64.so")) or force:
|
||||
arch = platform.machine()
|
||||
if re.match(r'^i.*86$', arch):
|
||||
arch = 'x86'
|
||||
if arch == "x86_64":
|
||||
arch = "amd64"
|
||||
if not os.path.exists(os.path.join(pydevd_attach_to_process_root, f"attach_linux_{arch}.so")) or force:
|
||||
os.system(os.path.join(pydevd_attach_to_process_root, "linux_and_mac", "compile_linux.sh"))
|
||||
elif platform.system() == "Darwin":
|
||||
if not os.path.exists(os.path.join(pydevd_attach_to_process_root, "attach.dylib")) or force:
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ ARCH="$(uname -m)"
|
|||
case $ARCH in
|
||||
i*86) SUFFIX=x86;;
|
||||
x86_64*) SUFFIX=amd64;;
|
||||
*) echo >&2 "unsupported: $ARCH"; exit 1;;
|
||||
*) echo >&2 "unsupported: $ARCH, this script may not work";;
|
||||
esac
|
||||
|
||||
SRC="$(dirname "$0")/.."
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue