nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{ lib
2, buildPythonPackage
3, fetchpatch
4, fetchPypi
5, packaging
6, pytest
7, pytestCheckHook
8, pythonOlder
9, setuptools-scm
10}:
11
12buildPythonPackage rec {
13 pname = "pytest-doctestplus";
14 version = "0.11.2";
15 format = "setuptools";
16
17 disabled = pythonOlder "3.7";
18
19 src = fetchPypi {
20 inherit pname version;
21 sha256 = "f393adf659709a5f111d6ca190871c61808a6f3611bd0a132e27e93b24dd3448";
22 };
23
24 nativeBuildInputs = [
25 setuptools-scm
26 ];
27
28 buildInputs = [
29 pytest
30 ];
31
32 propagatedBuildInputs = [
33 packaging
34 ];
35
36 checkInputs = [
37 pytestCheckHook
38 ];
39
40 patches = [
41 # Removal of distutils, https://github.com/astropy/pytest-doctestplus/pull/172
42 (fetchpatch {
43 name = "distutils-removal.patch";
44 url = "https://github.com/astropy/pytest-doctestplus/commit/ae2ee14cca0cde0fab355936995fa083529b00ff.patch";
45 sha256 = "sha256-uryKV7bWw2oz0glyh2lpGqtDPFvRTo8RmI1N1n15/d4=";
46 })
47 ];
48
49 disabledTests = [
50 # ERROR: usage: __main__.py [options] [file_or_dir] [file_or_dir] [...]
51 # __main__.py: error: unrecognized arguments: --remote-data
52 "test_remote_data_url"
53 "test_remote_data_float_cmp"
54 "test_remote_data_ignore_whitespace"
55 "test_remote_data_ellipsis"
56 "test_remote_data_requires"
57 "test_remote_data_ignore_warnings"
58 ];
59
60 meta = with lib; {
61 description = "Pytest plugin with advanced doctest features";
62 homepage = "https://astropy.org";
63 license = licenses.bsd3;
64 maintainers = with maintainers; [ costrouc ];
65 };
66}