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