at 24.11-pre 1.5 kB view raw
1{ 2 stdenv, 3 lib, 4 buildPythonPackage, 5 fetchFromGitHub, 6 setuptools, 7 pytestCheckHook, 8 matplotlib, 9 python-snap7, 10 opencv4, 11}: 12 13buildPythonPackage rec { 14 pname = "remi"; 15 version = "2022.7.27"; 16 pyproject = true; 17 18 src = fetchFromGitHub { 19 owner = "rawpython"; 20 repo = pname; 21 rev = version; 22 hash = "sha256-VQn+Uzp6oGSit8ot0e8B0C2N41Q8+J+o91skyVN1gDA="; 23 }; 24 25 preCheck = '' 26 # for some reason, REMI already deal with these using try blocks, but they fail 27 substituteInPlace test/test_widget.py \ 28 --replace-fail \ 29 "from html_validator import " \ 30 "from .html_validator import " 31 substituteInPlace test/test_examples_app.py \ 32 --replace-fail \ 33 "from mock_server_and_request import " \ 34 "from .mock_server_and_request import " \ 35 --replace-fail \ 36 "from html_validator import " \ 37 "from .html_validator import " 38 # Halves number of warnings 39 substituteInPlace test/test_*.py \ 40 --replace-quiet \ 41 "self.assertEquals(" \ 42 "self.assertEqual(" 43 ''; 44 45 nativeBuildInputs = [ setuptools ]; 46 47 nativeCheckInputs = [ 48 pytestCheckHook 49 python-snap7 50 opencv4 51 matplotlib 52 ]; 53 54 pythonImportsCheck = [ 55 "remi" 56 "editor" 57 "editor.widgets" 58 ]; 59 60 meta = with lib; { 61 description = "Pythonic, lightweight and websocket-based webui library"; 62 homepage = "https://github.com/rawpython/remi"; 63 license = with licenses; [ asl20 ]; 64 maintainers = with maintainers; [ pbsds ]; 65 }; 66}