nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at 22.05 112 lines 2.2 kB view raw
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-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.61.1"; 34 35 disabled = pythonOlder "3.7"; 36 37 src = fetchFromGitHub { 38 owner = "simonw"; 39 repo = pname; 40 rev = version; 41 sha256 = "sha256-HVzMyF4ujYK12UQ25il/XROPo+iBldsMxOTx+duoc5o="; 42 }; 43 44 postPatch = '' 45 substituteInPlace setup.py \ 46 --replace '"pytest-runner"' "" \ 47 --replace "click>=7.1.1,<8.1.0" "click>=7.1.1,<8.2.0" \ 48 --replace "click-default-group~=1.2.2" "click-default-group" \ 49 --replace "hupper~=1.9" "hupper" \ 50 --replace "Jinja2>=2.10.3,<3.1.0" "Jinja2" \ 51 --replace "pint~=0.9" "pint" \ 52 --replace "uvicorn~=0.11" "uvicorn" 53 ''; 54 55 propagatedBuildInputs = [ 56 aiofiles 57 asgi-csrf 58 asgiref 59 click 60 click-default-group 61 httpx 62 hupper 63 itsdangerous 64 janus 65 jinja2 66 mergedeep 67 pint 68 pluggy 69 python-baseconv 70 pyyaml 71 setuptools 72 uvicorn 73 ]; 74 75 checkInputs = [ 76 aiohttp 77 beautifulsoup4 78 pytest-asyncio 79 pytest-timeout 80 pytestCheckHook 81 trustme 82 ]; 83 84 # takes 30-180 mins to run entire test suite, not worth the CPU resources, slows down reviews 85 # with pytest-xdist, it still takes around 10 mins with 32 cores 86 # just run the csv tests, as this should give some indictation of correctness 87 pytestFlagsArray = [ 88 "tests/test_csv.py" 89 ]; 90 91 disabledTests = [ 92 "facet" 93 "_invalid_database" # checks error message when connecting to invalid database 94 ]; 95 96 pythonImportsCheck = [ 97 "datasette" 98 "datasette.cli" 99 "datasette.app" 100 "datasette.database" 101 "datasette.renderer" 102 "datasette.tracer" 103 "datasette.plugins" 104 ]; 105 106 meta = with lib; { 107 description = "Multi-tool for exploring and publishing data"; 108 homepage = "https://datasette.io/"; 109 license = licenses.asl20; 110 maintainers = with maintainers; [ costrouc ]; 111 }; 112}