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.63.2";
33 format = "setuptools";
34
35 disabled = pythonOlder "3.7";
36
37 src = fetchFromGitHub {
38 owner = "simonw";
39 repo = pname;
40 rev = "refs/tags/${version}";
41 sha256 = "sha256-VDmh2Q/ab5xaNbj0APuQ9pkZ+GHoNXW2crrJXi556Fk=";
42 };
43
44 postPatch = ''
45 substituteInPlace setup.py \
46 --replace '"pytest-runner"' "" \
47 --replace "click-default-group-wheel>=1.2.2" "click-default-group"
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 checkInputs = [
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 = [
83 "tests/test_csv.py"
84 ];
85
86 disabledTests = [
87 "facet"
88 "_invalid_database" # checks error message when connecting to invalid database
89 ];
90
91 pythonImportsCheck = [
92 "datasette"
93 "datasette.cli"
94 "datasette.app"
95 "datasette.database"
96 "datasette.renderer"
97 "datasette.tracer"
98 "datasette.plugins"
99 ];
100
101 meta = with lib; {
102 description = "Multi-tool for exploring and publishing data";
103 homepage = "https://datasette.io/";
104 license = licenses.asl20;
105 maintainers = with maintainers; [ costrouc ];
106 };
107}