This commit is contained in:
Xeonacid 2025-12-22 07:30:13 +00:00 committed by GitHub
commit 9a412a49c5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 8 additions and 2 deletions

View file

@ -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:

View file

@ -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")/.."