1{
2 lib,
3 buildPythonPackage,
4 asteval,
5 dill,
6 fetchPypi,
7 matplotlib,
8 numpy,
9 pandas,
10 pytestCheckHook,
11 pythonOlder,
12 scipy,
13 setuptools-scm,
14 setuptools,
15 uncertainties,
16}:
17
18buildPythonPackage rec {
19 pname = "lmfit";
20 version = "1.3.3";
21 pyproject = true;
22
23 disabled = pythonOlder "3.8";
24
25 src = fetchPypi {
26 inherit pname version;
27 hash = "sha256-czIea4gfL2hiNXIaffwCr2uw8DCiXv62Zjj2KxxgU6E=";
28 };
29
30 postPatch = ''
31 substituteInPlace pyproject.toml \
32 --replace-fail "--cov=lmfit --cov-report html" ""
33 '';
34
35 build-system = [
36 setuptools
37 setuptools-scm
38 ];
39
40 dependencies = [
41 asteval
42 dill
43 numpy
44 scipy
45 uncertainties
46 ];
47
48 nativeCheckInputs = [
49 matplotlib
50 pandas
51 pytestCheckHook
52 ];
53
54 pythonImportsCheck = [ "lmfit" ];
55
56 disabledTests = [ "test_check_ast_errors" ];
57
58 meta = with lib; {
59 description = "Least-Squares Minimization with Bounds and Constraints";
60 homepage = "https://lmfit.github.io/lmfit-py/";
61 changelog = "https://github.com/lmfit/lmfit-py/releases/tag/${version}";
62 license = licenses.bsd3;
63 maintainers = with maintainers; [ nomeata ];
64 };
65}