{
  python3Packages,
  fetchPypi,
  ...
}:
python3Packages.buildPythonPackage rec {
  pname = "spandrel";
  version = "0.4.0";
  pyproject = true;

  src = fetchPypi {
    inherit pname version;
    hash = "sha256-9FUmiT+SOhLvN1QsROREsSCJdlk7x8zfpU/QTHw+gMo=";
  };

  build-system =
    let
      inherit (python3Packages) setuptools;
    in
    [
      setuptools
    ];

  dependencies =
    let
      inherit (python3Packages)
        torch
        torchvision
        safetensors
        numpy
        einops
        typing-extensions
        ;
    in
    [
      torch
      torchvision
      safetensors
      numpy
      einops
      typing-extensions
    ];

  doCheck = false;
}
