mirror of
https://github.com/microsoft/debugpy.git
synced 2025-12-23 08:48:12 +00:00
build_attach_binaries: support other arch on linux
This commit is contained in:
parent
698499e9ec
commit
f22b2d38b1
1 changed files with 7 additions and 1 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:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue