summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules/scooby/default.nix
blob: 1e9d4625ba5fda7a242be886c7e1e2e121fd59d5 (plain)
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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
{
  lib,
  beautifulsoup4,
  buildPythonPackage,
  fetchFromGitHub,
  iniconfig,
  numpy,
  psutil,
  pytest-console-scripts,
  pytestCheckHook,
  pyvips,
  scipy,
  setuptools-scm,
}:

buildPythonPackage rec {
  pname = "scooby";
  version = "0.11.0";
  pyproject = true;

  src = fetchFromGitHub {
    owner = "banesullivan";
    repo = "scooby";
    tag = "v${version}";
    hash = "sha256-krExDVT9evG9ODZjTGpX+S1ygh7lMob06fzOwhh/hzA=";
  };

  build-system = [ setuptools-scm ];

  optional-dependencies = {
    cpu = [
      psutil
      # mkl
    ];
  };

  nativeCheckInputs = [
    beautifulsoup4
    iniconfig
    numpy
    pytest-console-scripts
    pytestCheckHook
    pyvips
    scipy
  ];

  preCheck = ''
    export PATH="$PATH:$out/bin";
  '';

  pythonImportsCheck = [ "scooby" ];

  disabledTests = [
    # Tests have additions requirements (e.g., time and module)
    "test_get_version"
    "test_tracking"
    "test_import_os_error"
    "test_import_time"
    # TypeError: expected str, bytes or os.PathLike object, not list
    "test_cli"
    # Fails to find iniconfig in environment
    "test_auto_report"
  ];

  meta = {
    changelog = "https://github.com/banesullivan/scooby/releases/tag/v${version}";
    description = "Lightweight tool for reporting Python package versions and hardware resources";
    mainProgram = "scooby";
    homepage = "https://github.com/banesullivan/scooby";
    license = lib.licenses.mit;
    maintainers = with lib.maintainers; [ wegank ];
  };
}