File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1313
1414from setuptools import setup , find_namespace_packages
1515import sys
16+ import os
1617import platform
1718import shutil
1819from pathlib import Path
@@ -102,7 +103,17 @@ def get_platform_classifier(platform_name):
102103 raise ValueError (f"Unknown platform: { platform_name } " )
103104
104105def get_current_platform ():
105- """Determine the current platform name."""
106+ """Determine the current platform name.
107+
108+ Respects _PYTHON_HOST_PLATFORM environment variable for platform namings.
109+ """
110+ # Check if we're cross-compiling (used by python -m build)
111+ host_platform = os .environ .get ('_PYTHON_HOST_PLATFORM' )
112+ if host_platform :
113+ # Return the host platform as-is for proper wheel tagging
114+ return host_platform
115+
116+ # Default platform detection
106117 if sys .platform == "win32" :
107118 if platform .machine () == "ARM64" :
108119 return "win_arm64"
You can’t perform that action at this time.
0 commit comments