diff --git a/.audit/jameshilliard_sysconfig-machine.md b/.audit/jameshilliard_sysconfig-machine.md new file mode 100644 index 000000000..90cd1c170 --- /dev/null +++ b/.audit/jameshilliard_sysconfig-machine.md @@ -0,0 +1,10 @@ +## AI Assistance Disclosure + +- [x] I did **not** use any AI-assistance tools to help create this pull request. +- [ ] I **did** use AI-assistance tools to *help* create this pull request. +- [x] I have read, understood and followed the projects' [AI Policy](https://github.com/crossbario/autobahn-python/blob/main/AI_POLICY.md) when creating code, documentation etc. for this pull request. + +Submitted by: @jameshilliard +Date: 2026-01-01 +Related issue(s): #1834 +Branch: sysconfig-machine diff --git a/src/autobahn/nvx/_compile_args.py b/src/autobahn/nvx/_compile_args.py index e17d568fe..6e5978fc9 100644 --- a/src/autobahn/nvx/_compile_args.py +++ b/src/autobahn/nvx/_compile_args.py @@ -124,7 +124,7 @@ import os import sys -import platform +import sysconfig def is_building_wheel(): @@ -194,7 +194,7 @@ def get_compile_args(): return ["/O2", "/W3"] # GCC/Clang on POSIX (Linux, macOS, *BSD) - machine = platform.machine().lower() + machine = sysconfig.get_platform().lower().split("-")[-1] # Base flags for all POSIX platforms base_args = [ @@ -245,7 +245,7 @@ def _get_safe_march_flag(machine): Parameters ---------- machine : str - Machine architecture from platform.machine().lower() + Machine architecture from sysconfig.get_platform().lower().split("-")[-1] Returns -------