summaryrefslogtreecommitdiffstats
path: root/Lib/platform.py
diff options
context:
space:
mode:
authorAiden Fox Ivey <aiden@fox-ivey.com>2024-01-26 20:36:50 (GMT)
committerGitHub <noreply@github.com>2024-01-26 20:36:50 (GMT)
commitb5c7c84673b96bfdd7c877521a970f7a4beafece (patch)
tree828c466dfdbb7701b525247ab415b86c5cb9cd83 /Lib/platform.py
parent07236f5b39a2e534cf190cd4f7c73300d209520b (diff)
downloadcpython-b5c7c84673b96bfdd7c877521a970f7a4beafece.zip
cpython-b5c7c84673b96bfdd7c877521a970f7a4beafece.tar.gz
cpython-b5c7c84673b96bfdd7c877521a970f7a4beafece.tar.bz2
gh-114490: Add check for Mach-O linkage in Lib/platform.py (#114491)
``platform.architecture()`` now returns the format of binaries (e.g. Mach-O) instead of the default empty string. Co-authored-by: AN Long <aisk@users.noreply.github.com>
Diffstat (limited to 'Lib/platform.py')
-rwxr-xr-xLib/platform.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/Lib/platform.py b/Lib/platform.py
index 75aa555..b564722 100755
--- a/Lib/platform.py
+++ b/Lib/platform.py
@@ -752,6 +752,8 @@ def architecture(executable=sys.executable, bits='', linkage=''):
# Linkage
if 'ELF' in fileout:
linkage = 'ELF'
+ elif 'Mach-O' in fileout:
+ linkage = "Mach-O"
elif 'PE' in fileout:
# E.g. Windows uses this format
if 'Windows' in fileout: