1{
2 lib,
3 beautifulsoup4,
4 buildPythonPackage,
5 fetchFromGitHub,
6 iniconfig,
7 numpy,
8 psutil,
9 pytest-console-scripts,
10 pytestCheckHook,
11 pythonOlder,
12 pyvips,
13 scipy,
14 setuptools-scm,
15}:
16
17buildPythonPackage rec {
18 pname = "scooby";
19 version = "0.10.2";
20 pyproject = true;
21
22 disabled = pythonOlder "3.7";
23
24 src = fetchFromGitHub {
25 owner = "banesullivan";
26 repo = "scooby";
27 tag = "v${version}";
28 hash = "sha256-vOcCs8U8HeBgO86bgS/kqYrNai1IsQ0upQveV06YfoE=";
29 };
30
31 build-system = [ setuptools-scm ];
32
33 optional-dependencies = {
34 cpu = [
35 psutil
36 # mkl
37 ];
38 };
39
40 nativeCheckInputs = [
41 beautifulsoup4
42 iniconfig
43 numpy
44 pytest-console-scripts
45 pytestCheckHook
46 pyvips
47 scipy
48 ];
49
50 preCheck = ''
51 export PATH="$PATH:$out/bin";
52 '';
53
54 pythonImportsCheck = [ "scooby" ];
55
56 disabledTests = [
57 # Tests have additions requirements (e.g., time and module)
58 "test_get_version"
59 "test_tracking"
60 "test_import_os_error"
61 "test_import_time"
62 # TypeError: expected str, bytes or os.PathLike object, not list
63 "test_cli"
64 # Fails to find iniconfig in environment
65 "test_auto_report"
66 ];
67
68 meta = with lib; {
69 changelog = "https://github.com/banesullivan/scooby/releases/tag/v${version}";
70 description = "Lightweight tool for reporting Python package versions and hardware resources";
71 mainProgram = "scooby";
72 homepage = "https://github.com/banesullivan/scooby";
73 license = licenses.mit;
74 maintainers = with maintainers; [ wegank ];
75 };
76}