1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 gitMinimal,
6 numpy,
7 packaging,
8 pytest,
9 pytestCheckHook,
10 pythonOlder,
11 setuptools,
12 setuptools-scm,
13}:
14
15buildPythonPackage rec {
16 pname = "pytest-doctestplus";
17 version = "1.4.0";
18 pyproject = true;
19
20 disabled = pythonOlder "3.8";
21
22 src = fetchFromGitHub {
23 owner = "scientific-python";
24 repo = "pytest-doctestplus";
25 tag = "v${version}";
26 hash = "sha256-hKxTniN7BHDdIHqxNGOuvD7Rk5ChSh1Zn6fo6G+Uty4=";
27 };
28
29 postPatch = ''
30 substituteInPlace pytest_doctestplus/plugin.py \
31 --replace-fail '"git"' '"${lib.getExe gitMinimal}"'
32 '';
33
34 build-system = [
35 setuptools
36 setuptools-scm
37 ];
38
39 buildInputs = [ pytest ];
40
41 dependencies = [
42 packaging
43 ];
44
45 pythonImportsCheck = [ "pytest_doctestplus" ];
46
47 nativeCheckInputs = [
48 numpy
49 pytestCheckHook
50 ];
51
52 disabledTests = [
53 # ERROR: usage: __main__.py [options] [file_or_dir] [file_or_dir] [...]
54 # __main__.py: error: unrecognized arguments: --remote-data
55 "test_remote_data_url"
56 "test_remote_data_float_cmp"
57 "test_remote_data_ignore_whitespace"
58 "test_remote_data_ellipsis"
59 "test_remote_data_requires"
60 "test_remote_data_ignore_warnings"
61 "test_remote_data_all"
62 ];
63
64 meta = with lib; {
65 description = "Pytest plugin with advanced doctest features";
66 homepage = "https://astropy.org";
67 license = licenses.bsd3;
68 maintainers = [ ];
69 };
70}