From 52a0e458e4ff1472d2ba2f8aa551de2936bc7a40 Mon Sep 17 00:00:00 2001 From: Gaetan Lepage Date: Sun, 16 Mar 2025 11:02:56 +0100 Subject: [PATCH] python312Packages.ezyrb: cleanup, fix build --- .../python-modules/ezyrb/default.nix | 39 ++++++++++++++----- 1 file changed, 29 insertions(+), 10 deletions(-) diff --git a/pkgs/development/python-modules/ezyrb/default.nix b/pkgs/development/python-modules/ezyrb/default.nix index c3506c61d2ff..f779b98cb4d2 100644 --- a/pkgs/development/python-modules/ezyrb/default.nix +++ b/pkgs/development/python-modules/ezyrb/default.nix @@ -2,22 +2,26 @@ lib, buildPythonPackage, fetchFromGitHub, - pythonOlder, + + # build-system + setuptools, + + # dependencies future, numpy, scipy, matplotlib, scikit-learn, torch, + + # tests pytestCheckHook, }: buildPythonPackage rec { pname = "ezyrb"; version = "1.3.0.post2404"; - format = "setuptools"; - - disabled = pythonOlder "3.7"; + pyproject = true; src = fetchFromGitHub { owner = "mathLab"; @@ -26,12 +30,27 @@ buildPythonPackage rec { hash = "sha256-nu75Geyeu1nTLoGaohXB9pmbUWKgdgch9Z5OJqz9xKQ="; }; - propagatedBuildInputs = [ + # AttributeError: module 'numpy' has no attribute 'VisibleDeprecationWarning' + postPatch = '' + substituteInPlace \ + tests/test_k_neighbors_regressor.py \ + tests/test_linear.py \ + tests/test_radius_neighbors_regressor.py \ + --replace-fail \ + "np.VisibleDeprecationWarning" \ + "np.exceptions.VisibleDeprecationWarning" + ''; + + build-system = [ + setuptools + ]; + + dependencies = [ future - numpy - scipy matplotlib + numpy scikit-learn + scipy torch ]; @@ -44,11 +63,11 @@ buildPythonPackage rec { "tests/test_podae.py" ]; - meta = with lib; { + meta = { description = "Easy Reduced Basis method"; homepage = "https://mathlab.github.io/EZyRB/"; downloadPage = "https://github.com/mathLab/EZyRB/releases"; - license = licenses.mit; - maintainers = with maintainers; [ yl3dy ]; + license = lib.licenses.mit; + maintainers = with lib.maintainers; [ yl3dy ]; }; }