From a43a90895abfdc780a3543b1c5e968f49566ead7 Mon Sep 17 00:00:00 2001 From: Gaetan Lepage Date: Fri, 13 Sep 2024 20:38:15 +0200 Subject: [PATCH] python312Packages.ml-dtypes: 0.4.0 -> 0.5.0 Diff: https://github.com/jax-ml/ml_dtypes/compare/refs/tags/v0.4.0...v0.5.0 Changelog: https://github.com/jax-ml/ml_dtypes/releases/tag/v0.5.0 --- .../python-modules/ml-dtypes/default.nix | 34 +++++++++---------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/pkgs/development/python-modules/ml-dtypes/default.nix b/pkgs/development/python-modules/ml-dtypes/default.nix index 0fd14edd7b21..b23ca450327c 100644 --- a/pkgs/development/python-modules/ml-dtypes/default.nix +++ b/pkgs/development/python-modules/ml-dtypes/default.nix @@ -1,26 +1,29 @@ { lib, buildPythonPackage, - pythonOlder, fetchFromGitHub, + + # build-system setuptools, + + # dependencies numpy, - pytestCheckHook, + + # tests absl-py, + pytestCheckHook, }: buildPythonPackage rec { pname = "ml-dtypes"; - version = "0.4.0"; + version = "0.5.0"; pyproject = true; - disabled = pythonOlder "3.9"; - src = fetchFromGitHub { owner = "jax-ml"; repo = "ml_dtypes"; rev = "refs/tags/v${version}"; - hash = "sha256-3qZ1lS1IdSXNLRNE9tyuO9qauVBDlECZvmmwaOffD30="; + hash = "sha256-+6job9fEHVguh9JBE/NUv+QezwQohuKPO8DlhbaawZ4="; # Since this upstream patch (https://github.com/jax-ml/ml_dtypes/commit/1bfd097e794413b0d465fa34f2eff0f3828ff521), # the attempts to use the nixpkgs packaged eigen dependency have failed. # Hence, we rely on the bundled eigen library. @@ -29,20 +32,17 @@ buildPythonPackage rec { postPatch = '' substituteInPlace pyproject.toml \ - --replace "numpy~=1.21.2" "numpy" \ - --replace "numpy~=1.23.3" "numpy" \ - --replace "numpy~=1.26.0" "numpy" \ - --replace "numpy==2.0.0rc1" "numpy" \ - --replace "setuptools~=68.1.0" "setuptools" + --replace-fail "numpy~=2.0" "numpy" \ + --replace-fail "setuptools~=73.0.1" "setuptools" ''; - nativeBuildInputs = [ setuptools ]; + build-system = [ setuptools ]; - propagatedBuildInputs = [ numpy ]; + dependencies = [ numpy ]; nativeCheckInputs = [ - pytestCheckHook absl-py + pytestCheckHook ]; preCheck = '' @@ -53,12 +53,12 @@ buildPythonPackage rec { pythonImportsCheck = [ "ml_dtypes" ]; - meta = with lib; { + meta = { description = "Stand-alone implementation of several NumPy dtype extensions used in machine learning libraries"; homepage = "https://github.com/jax-ml/ml_dtypes"; changelog = "https://github.com/jax-ml/ml_dtypes/releases/tag/v${version}"; - license = licenses.asl20; - maintainers = with maintainers; [ + license = lib.licenses.asl20; + maintainers = with lib.maintainers; [ GaetanLepage samuela ];