diff options
Diffstat (limited to 'pkgs/development/python-modules/safetensors/default.nix')
-rw-r--r-- | pkgs/development/python-modules/safetensors/default.nix | 62 |
1 files changed, 33 insertions, 29 deletions
diff --git a/pkgs/development/python-modules/safetensors/default.nix b/pkgs/development/python-modules/safetensors/default.nix index 4005a620d8a6e..c3e03f98876d3 100644 --- a/pkgs/development/python-modules/safetensors/default.nix +++ b/pkgs/development/python-modules/safetensors/default.nix @@ -1,22 +1,23 @@ -{ stdenv -, lib -, buildPythonPackage -, cargo -, fetchFromGitHub -, h5py -, numpy -, pythonOlder -, pytestCheckHook -, rustc -, rustPlatform -, setuptools-rust -, torch -, libiconv +{ + stdenv, + lib, + buildPythonPackage, + cargo, + fetchFromGitHub, + h5py, + numpy, + pythonOlder, + pytestCheckHook, + rustc, + rustPlatform, + setuptools-rust, + torch, + libiconv, }: buildPythonPackage rec { pname = "safetensors"; - version = "0.4.2"; + version = "0.4.3"; pyproject = true; disabled = pythonOlder "3.7"; @@ -25,13 +26,13 @@ buildPythonPackage rec { owner = "huggingface"; repo = "safetensors"; rev = "refs/tags/v${version}"; - hash = "sha256-hdPUI8k7CCQwt2C/AsjUHRmAL6ob+yCN97KkWtqOQL8="; + hash = "sha256-Rc+o7epQJ8qEvdgbFnGvXxBr/U4eULZwkKNEaPlJkyU="; }; cargoDeps = rustPlatform.fetchCargoTarball { inherit src; sourceRoot = "${src.name}/bindings/python"; - hash = "sha256-7n9aYlha6IaPsZ2zMfD5EIkrk8ENwMBwj41s6QU7ml0="; + hash = "sha256-tzNEUvWgolSwX0t/JLgYcTEIv3/FiKxoTJ4VjFQs8AY="; }; sourceRoot = "${src.name}/bindings/python"; @@ -47,22 +48,25 @@ buildPythonPackage rec { buildInputs = lib.optionals stdenv.isDarwin [ libiconv ]; nativeCheckInputs = [ - h5py numpy pytestCheckHook torch + h5py + numpy + pytestCheckHook + torch ]; pytestFlagsArray = [ "tests" ]; # don't require PaddlePaddle (not in Nixpkgs), Flax, or Tensorflow (onerous) to run tests: - disabledTestPaths = [ - "tests/test_flax_comparison.py" - "tests/test_paddle_comparison.py" - "tests/test_tf_comparison.py" - ] ++ lib.optionals stdenv.isDarwin [ - # don't require mlx (not in Nixpkgs) to run tests - "tests/test_mlx_comparison.py" - ]; + disabledTestPaths = + [ + "tests/test_flax_comparison.py" + "tests/test_paddle_comparison.py" + "tests/test_tf_comparison.py" + ] + ++ lib.optionals stdenv.isDarwin [ + # don't require mlx (not in Nixpkgs) to run tests + "tests/test_mlx_comparison.py" + ]; - pythonImportsCheck = [ - "safetensors" - ]; + pythonImportsCheck = [ "safetensors" ]; meta = with lib; { homepage = "https://github.com/huggingface/safetensors"; |