From ef9c36840a5f8aff250f16c0bf30f5e7617eee07 Mon Sep 17 00:00:00 2001 From: Joachim Breitner Date: Tue, 9 May 2023 14:02:43 +0200 Subject: [PATCH] python3Packages.lmfit: init at 1.2.1 Co-authored-by: Jonas Heinrich --- .../python-modules/lmfit/default.nix | 61 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 63 insertions(+) create mode 100644 pkgs/development/python-modules/lmfit/default.nix diff --git a/pkgs/development/python-modules/lmfit/default.nix b/pkgs/development/python-modules/lmfit/default.nix new file mode 100644 index 000000000000..bed095186ec9 --- /dev/null +++ b/pkgs/development/python-modules/lmfit/default.nix @@ -0,0 +1,61 @@ +{ lib, + buildPythonPackage, + fetchPypi, + setuptools, + setuptools-scm, + asteval, + numpy, + scipy, + uncertainties, + pytestCheckHook, + pandas, + matplotlib, +}: + +buildPythonPackage rec { + pname = "lmfit"; + version = "1.2.1"; + + format = "pyproject"; + + src = fetchPypi { + inherit pname version; + hash = "sha256-AM71vRRb+BtzYwt4kmrySyTxgFQh5iEcpYVYiqfMQVs="; + }; + + postPatch = '' + substituteInPlace setup.cfg --replace "--cov=lmfit --cov-report html" "" + ''; + + nativeBuildInputs = [ + setuptools + setuptools-scm + ]; + + propagatedBuildInputs = [ + asteval + numpy + scipy + uncertainties + ]; + + nativeCheckInputs = [ + pytestCheckHook + pandas + matplotlib + ]; + + disabledTests = [ + # https://github.com/lmfit/lmfit-py/issues/878 + "test_emcee_multiprocessing" + "test_explicit_independent_vars" + "test_result_eval_custom_x" + ]; + + meta = with lib; { + description = "Least-Squares Minimization with Bounds and Constraints"; + homepage = "https://lmfit-py.readthedocs.io/"; + license = licenses.bsd3; + maintainers = with maintainers; [ nomeata ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 1a6d936c7b4f..f4c2e710c5d6 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -5777,6 +5777,8 @@ self: super: with self; { inherit (pkgs) lmdb; }; + lmfit = callPackage ../development/python-modules/lmfit { }; + lml = callPackage ../development/python-modules/lml { }; lmnotify = callPackage ../development/python-modules/lmnotify { };