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