python3Packages.wgpu-py: 0.22.1 -> 0.22.2
This commit is contained in:
parent
64b8938f0b
commit
cbec981982
@ -38,25 +38,37 @@
|
|||||||
}:
|
}:
|
||||||
buildPythonPackage rec {
|
buildPythonPackage rec {
|
||||||
pname = "wgpu-py";
|
pname = "wgpu-py";
|
||||||
version = "0.22.1";
|
version = "0.22.2";
|
||||||
pyproject = true;
|
pyproject = true;
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "pygfx";
|
owner = "pygfx";
|
||||||
repo = "wgpu-py";
|
repo = "wgpu-py";
|
||||||
tag = "v${version}";
|
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`.
|
postPatch =
|
||||||
# As we retrieve `wgpu-native` from nixpkgs instead, none of this is needed, and
|
# `requests` is only used to fetch a copy of `wgpu-native` via `tools/hatch_build.py`.
|
||||||
# remove an extra dependency.
|
# As we retrieve `wgpu-native` from nixpkgs instead, none of this is needed, and
|
||||||
postPatch = ''
|
# remove an extra dependency.
|
||||||
substituteInPlace pyproject.toml \
|
''
|
||||||
--replace-fail 'requires = ["requests", "hatchling"]' 'requires = ["hatchling"]' \
|
substituteInPlace pyproject.toml \
|
||||||
--replace-fail '[tool.hatch.build.targets.wheel.hooks.custom]' "" \
|
--replace-fail 'requires = ["requests", "hatchling"]' 'requires = ["hatchling"]' \
|
||||||
--replace-fail 'path = "tools/hatch_build.py"' ""
|
--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
|
# wgpu-py expects to have an appropriately named wgpu-native library in wgpu/resources
|
||||||
preBuild = ''
|
preBuild = ''
|
||||||
@ -114,7 +126,7 @@ buildPythonPackage rec {
|
|||||||
runHook preInstallCheck
|
runHook preInstallCheck
|
||||||
|
|
||||||
for suite in tests examples codegen tests_mem; do
|
for suite in tests examples codegen tests_mem; do
|
||||||
pytest -v $suite
|
pytest -vvv $suite
|
||||||
done
|
done
|
||||||
|
|
||||||
runHook postInstallCheck
|
runHook postInstallCheck
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user