nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 gitMinimal,
6 numpy,
7 packaging,
8 pytest,
9 pytestCheckHook,
10 setuptools,
11 setuptools-scm,
12}:
13
14buildPythonPackage rec {
15 pname = "pytest-doctestplus";
16 version = "1.7.0";
17 pyproject = true;
18
19 src = fetchFromGitHub {
20 owner = "scientific-python";
21 repo = "pytest-doctestplus";
22 tag = "v${version}";
23 hash = "sha256-64I0K0+yYU1omGkVgfxeD9r9s9yHp0ik1HAsEc1NNtA=";
24 };
25
26 postPatch = ''
27 substituteInPlace pytest_doctestplus/plugin.py \
28 --replace-fail '"git"' '"${lib.getExe gitMinimal}"'
29 '';
30
31 build-system = [
32 setuptools
33 setuptools-scm
34 ];
35
36 buildInputs = [ pytest ];
37
38 dependencies = [
39 packaging
40 ];
41
42 pythonImportsCheck = [ "pytest_doctestplus" ];
43
44 nativeCheckInputs = [
45 numpy
46 pytestCheckHook
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 "test_remote_data_all"
59 ];
60
61 meta = {
62 description = "Pytest plugin with advanced doctest features";
63 homepage = "https://astropy.org";
64 license = lib.licenses.bsd3;
65 maintainers = [ ];
66 };
67}