2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchFromGitHub,
|
|
|
|
aiofiles,
|
|
|
|
asgi-csrf,
|
|
|
|
click,
|
|
|
|
click-default-group,
|
|
|
|
itsdangerous,
|
|
|
|
janus,
|
|
|
|
jinja2,
|
|
|
|
hupper,
|
|
|
|
mergedeep,
|
|
|
|
pint,
|
|
|
|
pluggy,
|
|
|
|
python-baseconv,
|
|
|
|
pyyaml,
|
|
|
|
uvicorn,
|
|
|
|
httpx,
|
|
|
|
pytestCheckHook,
|
|
|
|
pytest-asyncio,
|
|
|
|
pytest-timeout,
|
|
|
|
aiohttp,
|
|
|
|
beautifulsoup4,
|
|
|
|
asgiref,
|
|
|
|
setuptools,
|
|
|
|
trustme,
|
|
|
|
pythonOlder,
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "datasette";
|
2024-06-20 14:57:18 +00:00
|
|
|
version = "0.64.7";
|
2022-10-30 15:09:59 +00:00
|
|
|
format = "setuptools";
|
2021-12-26 17:43:05 +00:00
|
|
|
|
2023-10-19 13:55:26 +00:00
|
|
|
disabled = pythonOlder "3.8";
|
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}";
|
2024-06-20 14:57:18 +00:00
|
|
|
hash = "sha256-MxTCVgV0xDKXiYOx6rh5v55uQqlf9Wd06wHfnhDS4Hk=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2022-04-27 09:35:20 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace setup.py \
|
2023-11-16 04:20:00 +00:00
|
|
|
--replace '"pytest-runner"' ""
|
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
|
2024-06-05 15:53:02 +00:00
|
|
|
pytestFlagsArray = [ "tests/test_csv.py" ];
|
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";
|
2024-04-21 15:54:59 +00:00
|
|
|
mainProgram = "datasette";
|
2021-06-28 23:13:55 +00:00
|
|
|
homepage = "https://datasette.io/";
|
2023-10-09 19:29:22 +00:00
|
|
|
changelog = "https://github.com/simonw/datasette/releases/tag/${version}";
|
2020-04-24 23:36:52 +00:00
|
|
|
license = licenses.asl20;
|
2023-08-04 22:07:22 +00:00
|
|
|
maintainers = with maintainers; [ ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|