From cbec98198257fa7dd6e4f34725ffbef18a8967fe Mon Sep 17 00:00:00 2001 From: Benjamin Sparks Date: Wed, 28 May 2025 14:20:48 +0000 Subject: [PATCH] python3Packages.wgpu-py: 0.22.1 -> 0.22.2 --- .../python-modules/wgpu-py/default.nix | 36 ++++++++++++------- 1 file changed, 24 insertions(+), 12 deletions(-) diff --git a/pkgs/development/python-modules/wgpu-py/default.nix b/pkgs/development/python-modules/wgpu-py/default.nix index fe5b84f5539c..e951f5a30933 100644 --- a/pkgs/development/python-modules/wgpu-py/default.nix +++ b/pkgs/development/python-modules/wgpu-py/default.nix @@ -38,25 +38,37 @@ }: buildPythonPackage rec { pname = "wgpu-py"; - version = "0.22.1"; + version = "0.22.2"; pyproject = true; src = fetchFromGitHub { owner = "pygfx"; repo = "wgpu-py"; tag = "v${version}"; - hash = "sha256-sjpTTOYv5FXMieUJvCQ2nJ1I0zaguyd7//vdLlt8Bmk="; + hash = "sha256-HGpOEsTj4t57z38qKF6i1oUj7R7aFl8Xgk5y0TtgyMg="; }; - # `requests` is only used to fetch a copy of `wgpu-native` via `tools/hatch_build.py`. - # As we retrieve `wgpu-native` from nixpkgs instead, none of this is needed, and - # remove an extra dependency. - postPatch = '' - substituteInPlace pyproject.toml \ - --replace-fail 'requires = ["requests", "hatchling"]' 'requires = ["hatchling"]' \ - --replace-fail '[tool.hatch.build.targets.wheel.hooks.custom]' "" \ - --replace-fail 'path = "tools/hatch_build.py"' "" - ''; + postPatch = + # `requests` is only used to fetch a copy of `wgpu-native` via `tools/hatch_build.py`. + # As we retrieve `wgpu-native` from nixpkgs instead, none of this is needed, and + # remove an extra dependency. + '' + substituteInPlace pyproject.toml \ + --replace-fail 'requires = ["requests", "hatchling"]' 'requires = ["hatchling"]' \ + --replace-fail '[tool.hatch.build.targets.wheel.hooks.custom]' "" \ + --replace-fail 'path = "tools/hatch_build.py"' "" + '' + # Skip the compute_textures / astronauts example during testing, as it uses `imageio` to + # retrieve an image of an astronaut, which touches the network. + + '' + substituteInPlace examples/compute_textures.py \ + --replace-fail 'import wgpu' 'import wgpu # run_example = false' + '' + # Tweak tests that fail due to a dependency of `wgpu-native`, `naga`, adding an `ir` module + + '' + substituteInPlace tests/test_wgpu_native_errors.py \ + --replace-fail 'naga::' 'naga::ir::' + ''; # wgpu-py expects to have an appropriately named wgpu-native library in wgpu/resources preBuild = '' @@ -114,7 +126,7 @@ buildPythonPackage rec { runHook preInstallCheck for suite in tests examples codegen tests_mem; do - pytest -v $suite + pytest -vvv $suite done runHook postInstallCheck