1{ lib
2, buildPythonPackage
3, fetchPypi
4, isPy27
5, jinja2
6, sphinx
7, pytestCheckHook
8, matplotlib
9}:
10
11buildPythonPackage rec {
12 pname = "numpydoc";
13 version = "1.4.0";
14 format = "setuptools";
15
16 disabled = isPy27;
17
18 src = fetchPypi {
19 inherit pname;
20 inherit version;
21 sha256 = "sha256-lJTa8cdhL1mQX6CeZcm4qQu6yzgE2R96lOd4gx5vz6U=";
22 };
23
24 postPatch = ''
25 substituteInPlace setup.py \
26 --replace "Jinja2>=2.10,<3.1" "Jinja2>=2.10,<3.2"
27 substituteInPlace setup.cfg \
28 --replace "--cov-report=" "" \
29 --replace "--cov=numpydoc" ""
30 '';
31
32 propagatedBuildInputs = [
33 jinja2
34 sphinx
35 ];
36
37 checkInputs = [
38 matplotlib
39 pytestCheckHook
40 ];
41
42 disabledTests = [
43 # https://github.com/numpy/numpydoc/issues/373
44 "test_MyClass"
45 "test_my_function"
46 "test_reference"
47 ];
48
49 pythonImportsCheck = [
50 "numpydoc"
51 ];
52
53 meta = {
54 description = "Sphinx extension to support docstrings in Numpy format";
55 homepage = "https://github.com/numpy/numpydoc";
56 license = lib.licenses.free;
57 };
58}