Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at gcc-offload 122 lines 2.4 kB view raw
1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 aiofiles, 6 asgi-csrf, 7 click, 8 click-default-group, 9 flexcache, 10 flexparser, 11 httpx, 12 hupper, 13 itsdangerous, 14 janus, 15 jinja2, 16 mergedeep, 17 platformdirs, 18 pluggy, 19 pyyaml, 20 typing-extensions, 21 uvicorn, 22 pytestCheckHook, 23 pytest-asyncio, 24 pytest-timeout, 25 aiohttp, 26 beautifulsoup4, 27 asgiref, 28 setuptools, 29 trustme, 30 pythonOlder, 31}: 32 33buildPythonPackage rec { 34 pname = "datasette"; 35 version = "0.65.1"; 36 pyproject = true; 37 38 disabled = pythonOlder "3.8"; 39 40 src = fetchFromGitHub { 41 owner = "simonw"; 42 repo = pname; 43 rev = "refs/tags/${version}"; 44 hash = "sha256-kVtldBuDy19DmyxEQLtAjs1qiNIjaT8+rnHlFfGNHec="; 45 }; 46 47 postPatch = '' 48 substituteInPlace setup.py \ 49 --replace '"pytest-runner"' "" 50 ''; 51 52 build-system = [ setuptools ]; 53 54 pythonRemoveDeps = [ 55 "pip" 56 "setuptools" 57 ]; 58 59 dependencies = [ 60 aiofiles 61 asgi-csrf 62 asgiref 63 click 64 click-default-group 65 flexcache 66 flexparser 67 httpx 68 hupper 69 itsdangerous 70 janus 71 jinja2 72 mergedeep 73 platformdirs 74 pluggy 75 pyyaml 76 typing-extensions 77 uvicorn 78 ]; 79 80 nativeCheckInputs = [ 81 aiohttp 82 beautifulsoup4 83 pytest-asyncio 84 pytest-timeout 85 pytestCheckHook 86 trustme 87 ]; 88 89 # takes 30-180 mins to run entire test suite, not worth the CPU resources, slows down reviews 90 # with pytest-xdist, it still takes around 10 mins with 32 cores 91 # just run the csv tests, as this should give some indictation of correctness 92 pytestFlagsArray = [ 93 # datasette/app.py:14: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html 94 "-W" 95 "ignore::DeprecationWarning" 96 "tests/test_csv.py" 97 ]; 98 99 disabledTests = [ 100 "facet" 101 "_invalid_database" # checks error message when connecting to invalid database 102 ]; 103 104 pythonImportsCheck = [ 105 "datasette" 106 "datasette.cli" 107 "datasette.app" 108 "datasette.database" 109 "datasette.renderer" 110 "datasette.tracer" 111 "datasette.plugins" 112 ]; 113 114 meta = with lib; { 115 description = "Multi-tool for exploring and publishing data"; 116 mainProgram = "datasette"; 117 homepage = "https://datasette.io/"; 118 changelog = "https://github.com/simonw/datasette/releases/tag/${version}"; 119 license = licenses.asl20; 120 maintainers = [ ]; 121 }; 122}