Skip to content

Commit 64bb070

Browse files
committed
fix: Build debug
1 parent 729875f commit 64bb070

1 file changed

Lines changed: 12 additions & 1 deletion

File tree

setup.py

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313

1414
from setuptools import setup, find_namespace_packages
1515
import sys
16+
import os
1617
import platform
1718
import shutil
1819
from pathlib import Path
@@ -102,7 +103,17 @@ def get_platform_classifier(platform_name):
102103
raise ValueError(f"Unknown platform: {platform_name}")
103104

104105
def 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"

0 commit comments

Comments
 (0)