mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2026-06-02 02:38:43 +08:00
GP-0: Fixing pyghidra_launcher.py issue with Python 3.9
This commit is contained in:
@@ -84,7 +84,14 @@ def in_venv() -> bool:
|
||||
return sys.prefix != sys.base_prefix
|
||||
|
||||
def is_externally_managed() -> bool:
|
||||
marker: Path = Path(sysconfig.get_path('stdlib', sysconfig.get_default_scheme())) / 'EXTERNALLY-MANAGED'
|
||||
get_default_scheme = 'get_default_scheme'
|
||||
if hasattr(sysconfig, get_default_scheme):
|
||||
# Python 3.10 and later
|
||||
default_scheme = getattr(sysconfig, get_default_scheme)
|
||||
else:
|
||||
# Python 3.9
|
||||
default_scheme = getattr(sysconfig, f'_{get_default_scheme}')
|
||||
marker: Path = Path(sysconfig.get_path("stdlib", default_scheme())) / 'EXTERNALLY-MANAGED'
|
||||
return marker.is_file()
|
||||
|
||||
def get_venv_exe(venv_dir: Path) -> List[str]:
|
||||
|
||||
Reference in New Issue
Block a user