diff --git a/tools/hatch_build.py b/tools/hatch_build.py index 0925d67d..5c45a210 100644 --- a/tools/hatch_build.py +++ b/tools/hatch_build.py @@ -42,8 +42,11 @@ def initialize(self, version, build_data): # We only do our thing when this is a wheel build from the repo. # If this is an sdist build, or a wheel build from an sdist, # we go pure-Python mode, and expect the user to set WGPU_LIB_PATH. + # We also allow building an arch-agnostic wheel explicitly, using an env var. - if self.target_name == "wheel" and is_git_repo(): + if os.getenv("WGPU_PY_BUILD_NOARCH") in ("1", "true"): + pass # Explicitly disable including the lib + elif self.target_name == "wheel" and is_git_repo(): # Prepare check_git_status() remove_all_libs()