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
|
|
|
# Check Inputs
|
|
|
|
, 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";
|
2022-03-30 09:31:56 +00:00
|
|
|
version = "0.61.1";
|
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;
|
2020-04-24 23:36:52 +00:00
|
|
|
rev = version;
|
2022-03-30 09:31:56 +00:00
|
|
|
sha256 = "sha256-HVzMyF4ujYK12UQ25il/XROPo+iBldsMxOTx+duoc5o=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2022-04-27 09:35:20 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace setup.py \
|
|
|
|
--replace '"pytest-runner"' "" \
|
|
|
|
--replace "click>=7.1.1,<8.1.0" "click>=7.1.1,<8.2.0" \
|
|
|
|
--replace "click-default-group~=1.2.2" "click-default-group" \
|
|
|
|
--replace "hupper~=1.9" "hupper" \
|
|
|
|
--replace "Jinja2>=2.10.3,<3.1.0" "Jinja2" \
|
|
|
|
--replace "pint~=0.9" "pint" \
|
|
|
|
--replace "uvicorn~=0.11" "uvicorn"
|
|
|
|
'';
|
|
|
|
|
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
|
|
|
];
|
|
|
|
|
|
|
|
checkInputs = [
|
|
|
|
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
|
|
|
};
|
|
|
|
}
|