mirror of
https://github.com/python/cpython.git
synced 2025-07-07 19:35:27 +00:00
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>
This commit is contained in:
parent
07236f5b39
commit
b5c7c84673
2 changed files with 3 additions and 0 deletions
|
@ -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:
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
Add Mach-O linkage support for :func:`platform.architecture()`.
|
Loading…
Add table
Add a link
Reference in a new issue