Skip to content

Commit

Permalink
Allow disabling downloading lib when creating wheel
Browse files Browse the repository at this point in the history
  • Loading branch information
almarklein committed Jan 31, 2025
1 parent 11bb195 commit d7f0d2f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tools/hatch_build.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit d7f0d2f

Please sign in to comment.