summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules/orange-widget-base/default.nix
blob: f24813598ffa6375716e7b78d95e8f6899d1db78 (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
{
  lib,
  gitUpdater,
  stdenv,
  buildPythonPackage,
  setuptools,
  fetchFromGitHub,
  pyqt5,
  pyqtwebengine,
  matplotlib,
  orange-canvas-core,
  pyqtgraph,
  typing-extensions,
  qt5,
  pytestCheckHook,
  pytest-qt,
  appnope,
}:

buildPythonPackage rec {
  pname = "orange-widget-base";
  version = "4.26.0";
  pyproject = true;

  src = fetchFromGitHub {
    owner = "biolab";
    repo = "orange-widget-base";
    tag = version;
    hash = "sha256-XoQlZaY6pAflL0vWzSALDABOPybqV28xB/AS8L0DcBc=";
  };

  build-system = [ setuptools ];

  dependencies = [
    matplotlib
    orange-canvas-core
    pyqt5
    pyqtgraph
    pyqtwebengine
    typing-extensions
  ]
  ++ lib.optionals stdenv.hostPlatform.isDarwin [ appnope ];

  pythonImportsCheck = [ "orangewidget" ];

  preCheck = ''
    export HOME=$(mktemp -d)
    export QT_PLUGIN_PATH="${qt5.qtbase.bin}/${qt5.qtbase.qtPluginPrefix}"
    export QT_QPA_PLATFORM_PLUGIN_PATH="${qt5.qtbase.bin}/lib/qt-${qt5.qtbase.version}/plugins";
    export QT_QPA_PLATFORM=offscreen
  '';

  nativeCheckInputs = [
    pytest-qt
    pytestCheckHook
  ];

  disabledTestPaths = [
    "orangewidget/report/tests/test_report.py"
    "orangewidget/tests/test_widget.py"
  ];

  passthru.updateScript = gitUpdater { };

  meta = {
    description = "Implementation of the base OWBaseWidget class and utilities for use in Orange Canvas workflows";
    homepage = "https://github.com/biolab/orange-widget-base";
    license = [ lib.licenses.gpl3Plus ];
    maintainers = [ ];
  };
}