2020-04-24 23:36:52 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
|
|
|
, aiofiles
|
2020-09-25 04:45:31 +00:00
|
|
|
, asgi-csrf
|
2020-04-24 23:36:52 +00:00
|
|
|
, click
|
|
|
|
, click-default-group
|
2021-06-28 23:13:55 +00:00
|
|
|
, itsdangerous
|
2020-04-24 23:36:52 +00:00
|
|
|
, janus
|
|
|
|
, jinja2
|
|
|
|
, hupper
|
2020-09-25 04:45:31 +00:00
|
|
|
, mergedeep
|
2020-04-24 23:36:52 +00:00
|
|
|
, pint
|
|
|
|
, pluggy
|
2020-09-25 04:45:31 +00:00
|
|
|
, python-baseconv
|
|
|
|
, pyyaml
|
2020-04-24 23:36:52 +00:00
|
|
|
, uvicorn
|
2020-12-27 14:24:52 +00:00
|
|
|
, httpx
|
2020-04-24 23:36:52 +00:00
|
|
|
, pytestCheckHook
|
|
|
|
, pytest-asyncio
|
2021-06-28 23:13:55 +00:00
|
|
|
, pytest-timeout
|
2020-04-24 23:36:52 +00:00
|
|
|
, aiohttp
|
|
|
|
, beautifulsoup4
|
|
|
|
, asgiref
|
2020-05-29 06:06:01 +00:00
|
|
|
, setuptools
|
2021-06-28 23:13:55 +00:00
|
|
|
, trustme
|
|
|
|
, pythonOlder
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "datasette";
|
2023-01-20 10:41:00 +00:00
|
|
|
version = "0.64.1";
|
2022-10-30 15:09:59 +00:00
|
|
|
format = "setuptools";
|
2021-12-26 17:43:05 +00:00
|
|
|
|
2022-04-27 09:35:20 +00:00
|
|
|
disabled = pythonOlder "3.7";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "simonw";
|
2021-06-28 23:13:55 +00:00
|
|
|
repo = pname;
|
2022-11-21 17:40:18 +00:00
|
|
|
rev = "refs/tags/${version}";
|
2023-01-20 10:41:00 +00:00
|
|
|
sha256 = "sha256-EXYAiXqEfQVDTwc4MFTroLPEaTZ3QYTlUsuNQ72oHpA=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2022-04-27 09:35:20 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace setup.py \
|
|
|
|
--replace '"pytest-runner"' "" \
|
2022-10-30 15:09:59 +00:00
|
|
|
--replace "click-default-group-wheel>=1.2.2" "click-default-group"
|
2022-04-27 09:35:20 +00:00
|
|
|
'';
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
aiofiles
|
2020-09-25 04:45:31 +00:00
|
|
|
asgi-csrf
|
2021-06-28 23:13:55 +00:00
|
|
|
asgiref
|
2020-04-24 23:36:52 +00:00
|
|
|
click
|
|
|
|
click-default-group
|
2021-06-28 23:13:55 +00:00
|
|
|
httpx
|
|
|
|
hupper
|
|
|
|
itsdangerous
|
2020-04-24 23:36:52 +00:00
|
|
|
janus
|
|
|
|
jinja2
|
2020-09-25 04:45:31 +00:00
|
|
|
mergedeep
|
2020-04-24 23:36:52 +00:00
|
|
|
pint
|
|
|
|
pluggy
|
2020-09-25 04:45:31 +00:00
|
|
|
python-baseconv
|
|
|
|
pyyaml
|
2020-05-29 06:06:01 +00:00
|
|
|
setuptools
|
2021-06-28 23:13:55 +00:00
|
|
|
uvicorn
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2020-04-24 23:36:52 +00:00
|
|
|
aiohttp
|
|
|
|
beautifulsoup4
|
2021-06-28 23:13:55 +00:00
|
|
|
pytest-asyncio
|
|
|
|
pytest-timeout
|
|
|
|
pytestCheckHook
|
|
|
|
trustme
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
2021-06-28 23:13:55 +00:00
|
|
|
# takes 30-180 mins to run entire test suite, not worth the CPU resources, slows down reviews
|
|
|
|
# with pytest-xdist, it still takes around 10 mins with 32 cores
|
2020-12-27 14:24:52 +00:00
|
|
|
# just run the csv tests, as this should give some indictation of correctness
|
2020-04-24 23:36:52 +00:00
|
|
|
pytestFlagsArray = [
|
2020-12-27 14:24:52 +00:00
|
|
|
"tests/test_csv.py"
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
2021-06-28 23:13:55 +00:00
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
disabledTests = [
|
|
|
|
"facet"
|
|
|
|
"_invalid_database" # checks error message when connecting to invalid database
|
|
|
|
];
|
2020-10-19 00:13:06 +00:00
|
|
|
|
|
|
|
pythonImportsCheck = [
|
|
|
|
"datasette"
|
|
|
|
"datasette.cli"
|
|
|
|
"datasette.app"
|
|
|
|
"datasette.database"
|
|
|
|
"datasette.renderer"
|
|
|
|
"datasette.tracer"
|
|
|
|
"datasette.plugins"
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
2021-06-28 23:13:55 +00:00
|
|
|
description = "Multi-tool for exploring and publishing data";
|
|
|
|
homepage = "https://datasette.io/";
|
2020-04-24 23:36:52 +00:00
|
|
|
license = licenses.asl20;
|
2021-12-26 17:43:05 +00:00
|
|
|
maintainers = with maintainers; [ costrouc ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|