1{
2 lib,
3 buildPythonPackage,
4 fetchPypi,
5 setuptools,
6 setuptools-scm,
7 asteval,
8 dill,
9 numpy,
10 scipy,
11 uncertainties,
12 pytestCheckHook,
13 pandas,
14 matplotlib,
15}:
16
17buildPythonPackage rec {
18 pname = "lmfit";
19 version = "1.3.1";
20
21 pyproject = true;
22
23 src = fetchPypi {
24 inherit pname version;
25 hash = "sha256-vDhiRK29EO8aKixPnRez3vkFVSwKZK74VPCtRswwnMU=";
26 };
27
28 postPatch = ''
29 substituteInPlace pyproject.toml --replace "--cov=lmfit --cov-report html" ""
30 '';
31
32 nativeBuildInputs = [
33 setuptools
34 setuptools-scm
35 ];
36
37 propagatedBuildInputs = [
38 asteval
39 dill
40 numpy
41 scipy
42 uncertainties
43 ];
44
45 nativeCheckInputs = [
46 pytestCheckHook
47 pandas
48 matplotlib
49 ];
50
51 meta = with lib; {
52 description = "Least-Squares Minimization with Bounds and Constraints";
53 homepage = "https://lmfit-py.readthedocs.io/";
54 license = licenses.bsd3;
55 maintainers = with maintainers; [ nomeata ];
56 };
57}