summary refs log tree commit diff
path: root/pkgs/development/python-modules/numpydoc/default.nix
blob: b770ac26fbd7f91311f089efe9f7453c7b35bec1 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
{ lib
, buildPythonPackage
, fetchPypi
, isPy27
, jinja2
, sphinx
, pytestCheckHook
, matplotlib
}:

buildPythonPackage rec {
  pname = "numpydoc";
  version = "1.2.1";
  format = "setuptools";

  disabled = isPy27;

  src = fetchPypi {
    inherit pname;
    inherit version;
    sha256 = "sha256-fOgm7Q1Uw/3JCXmSqNc6TUWdxGhhE1HGjkRP7ESkWvY=";
  };

  postPatch = ''
    substituteInPlace setup.py \
      --replace "Jinja2>=2.10,<3.1" "Jinja2>=2.10,<3.2"
    substituteInPlace setup.cfg \
      --replace "--cov-report=" "" \
      --replace "--cov=numpydoc" ""
  '';

  propagatedBuildInputs = [
    jinja2
    sphinx
  ];

  checkInputs = [
    matplotlib
    pytestCheckHook
  ];

  disabledTests = [
    # https://github.com/numpy/numpydoc/issues/373
    "test_MyClass"
    "test_my_function"
    "test_reference"
  ];

  pythonImportsCheck = [
    "numpydoc"
  ];

  meta = {
    description = "Sphinx extension to support docstrings in Numpy format";
    homepage = "https://github.com/numpy/numpydoc";
    license = lib.licenses.free;
   };
}