slint-lsp: 1.9.1 -> 1.9.2 (#375714)
[NixPkgs.git] / pkgs / development / python-modules / remi / default.nix
blobb88ab282a6ad356550312d210740bf83a4958634
2   lib,
3   buildPythonPackage,
4   fetchFromGitHub,
5   pythonOlder,
6   setuptools,
7   pytestCheckHook,
8   matplotlib,
9   legacy-cgi,
10   python-snap7,
11   opencv4,
14 buildPythonPackage rec {
15   pname = "remi";
16   version = "2022.7.27";
17   pyproject = true;
19   src = fetchFromGitHub {
20     owner = "rawpython";
21     repo = "remi";
22     rev = version;
23     hash = "sha256-VQn+Uzp6oGSit8ot0e8B0C2N41Q8+J+o91skyVN1gDA=";
24   };
26   preCheck = ''
27     # for some reason, REMI already deal with these using try blocks, but they fail
28     substituteInPlace test/test_widget.py \
29       --replace-fail \
30         "from html_validator import " \
31         "from .html_validator import "
32     substituteInPlace test/test_examples_app.py \
33       --replace-fail \
34         "from mock_server_and_request import " \
35         "from .mock_server_and_request import " \
36       --replace-fail \
37         "from html_validator import " \
38         "from .html_validator import "
39     # Halves number of warnings
40     substituteInPlace test/test_*.py \
41       --replace-quiet \
42         "self.assertEquals(" \
43         "self.assertEqual("
44   '';
46   build-system = [ setuptools ];
48   dependencies =
49     [
50       setuptools # pkg_resources is referenced at runtime
51     ]
52     ++ lib.optionals (!pythonOlder "3.13") [
53       legacy-cgi
54     ];
56   nativeCheckInputs = [
57     pytestCheckHook
58     python-snap7
59     opencv4
60     matplotlib
61   ];
63   pythonImportsCheck = [
64     "remi"
65     "editor"
66     "editor.widgets"
67   ];
69   meta = {
70     description = "Pythonic, lightweight and websocket-based webui library";
71     homepage = "https://github.com/rawpython/remi";
72     license = with lib.licenses; [ asl20 ];
73     maintainers = with lib.maintainers; [ pbsds ];
74   };