From f9249f8361d7cea20be43dc1972cc49514baea4f Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sat, 14 Sep 2024 15:47:59 +0200 Subject: [PATCH] python312Packages.lmfit: refactor --- .../python-modules/lmfit/default.nix | 36 +++++++++++-------- 1 file changed, 21 insertions(+), 15 deletions(-) diff --git a/pkgs/development/python-modules/lmfit/default.nix b/pkgs/development/python-modules/lmfit/default.nix index 926944ee55e3..2445006427c2 100644 --- a/pkgs/development/python-modules/lmfit/default.nix +++ b/pkgs/development/python-modules/lmfit/default.nix @@ -1,40 +1,43 @@ { lib, buildPythonPackage, - fetchPypi, - setuptools, - setuptools-scm, asteval, dill, - numpy, - scipy, - uncertainties, - pytestCheckHook, - pandas, + fetchPypi, matplotlib, + numpy, + pandas, + pytestCheckHook, + pythonOlder, + scipy, + setuptools-scm, + setuptools, + uncertainties, }: buildPythonPackage rec { pname = "lmfit"; version = "1.3.2"; - pyproject = true; + disabled = pythonOlder "3.8"; + src = fetchPypi { inherit pname version; hash = "sha256-Mb7q4fAnwbjBTc1/LoSIqAt1+zied/ymd1Sb3C/ll7s="; }; postPatch = '' - substituteInPlace pyproject.toml --replace "--cov=lmfit --cov-report html" "" + substituteInPlace pyproject.toml \ + --replace-fail "--cov=lmfit --cov-report html" "" ''; - nativeBuildInputs = [ + build-system = [ setuptools setuptools-scm ]; - propagatedBuildInputs = [ + dependencies = [ asteval dill numpy @@ -43,14 +46,17 @@ buildPythonPackage rec { ]; nativeCheckInputs = [ - pytestCheckHook - pandas matplotlib + pandas + pytestCheckHook ]; + pythonImportsCheck = [ "lmfit" ]; + meta = with lib; { description = "Least-Squares Minimization with Bounds and Constraints"; - homepage = "https://lmfit-py.readthedocs.io/"; + homepage = "https://lmfit.github.io/lmfit-py/"; + changelog = "https://github.com/lmfit/lmfit-py/releases/tag/${version}"; license = licenses.bsd3; maintainers = with maintainers; [ nomeata ]; };