1{ lib 2, buildPythonPackage 3, fetchFromGitHub 4, aiofiles 5, asgi-csrf 6, click 7, click-default-group 8, itsdangerous 9, janus 10, jinja2 11, hupper 12, mergedeep 13, pint 14, pluggy 15, python-baseconv 16, pyyaml 17, uvicorn 18, httpx 19# Check Inputs 20, pytestCheckHook 21, pytest-runner 22, pytest-asyncio 23, pytest-timeout 24, aiohttp 25, beautifulsoup4 26, asgiref 27, setuptools 28, trustme 29, pythonOlder 30}: 31 32buildPythonPackage rec { 33 pname = "datasette"; 34 version = "0.58.1"; 35 disabled = pythonOlder "3.6"; 36 37 src = fetchFromGitHub { 38 owner = "simonw"; 39 repo = pname; 40 rev = version; 41 sha256 = "sha256-dtKqp7LV1fRjwOMAlmmAnC19j8hLA1oixGextATW6z0="; 42 }; 43 44 nativeBuildInputs = [ pytest-runner ]; 45 46 propagatedBuildInputs = [ 47 aiofiles 48 asgi-csrf 49 asgiref 50 click 51 click-default-group 52 httpx 53 hupper 54 itsdangerous 55 janus 56 jinja2 57 mergedeep 58 pint 59 pluggy 60 python-baseconv 61 pyyaml 62 setuptools 63 uvicorn 64 ]; 65 66 checkInputs = [ 67 aiohttp 68 beautifulsoup4 69 pytest-asyncio 70 pytest-timeout 71 pytestCheckHook 72 trustme 73 ]; 74 75 postConfigure = '' 76 substituteInPlace setup.py \ 77 --replace "click-default-group~=1.2.2" "click-default-group" \ 78 --replace "hupper~=1.9" "hupper" \ 79 --replace "pint~=0.9" "pint" \ 80 --replace "pluggy~=0.13.0" "pluggy" \ 81 --replace "uvicorn~=0.11" "uvicorn" \ 82 --replace "PyYAML~=5.3" "PyYAML" 83 ''; 84 85 # takes 30-180 mins to run entire test suite, not worth the CPU resources, slows down reviews 86 # with pytest-xdist, it still takes around 10 mins with 32 cores 87 # just run the csv tests, as this should give some indictation of correctness 88 pytestFlagsArray = [ 89 "tests/test_csv.py" 90 ]; 91 92 disabledTests = [ 93 "facet" 94 "_invalid_database" # checks error message when connecting to invalid database 95 ]; 96 97 pythonImportsCheck = [ 98 "datasette" 99 "datasette.cli" 100 "datasette.app" 101 "datasette.database" 102 "datasette.renderer" 103 "datasette.tracer" 104 "datasette.plugins" 105 ]; 106 107 meta = with lib; { 108 description = "Multi-tool for exploring and publishing data"; 109 homepage = "https://datasette.io/"; 110 license = licenses.asl20; 111 maintainers = [ maintainers.costrouc ]; 112 }; 113}