2019-05-07 13:52:16 +01:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
2020-04-03 19:12:50 +01:00
|
|
|
, aiofiles
|
2020-08-27 23:28:34 +01:00
|
|
|
, asgi-csrf
|
2019-05-07 13:52:16 +01:00
|
|
|
, click
|
|
|
|
, click-default-group
|
2020-04-03 19:12:50 +01:00
|
|
|
, janus
|
2019-05-07 13:52:16 +01:00
|
|
|
, jinja2
|
|
|
|
, hupper
|
2020-08-27 23:28:34 +01:00
|
|
|
, mergedeep
|
2019-05-07 13:52:16 +01:00
|
|
|
, pint
|
|
|
|
, pluggy
|
2020-08-27 23:28:34 +01:00
|
|
|
, python-baseconv
|
|
|
|
, pyyaml
|
2020-04-03 19:12:50 +01:00
|
|
|
, uvicorn
|
2020-12-26 17:36:56 +00:00
|
|
|
, httpx
|
2020-04-03 19:12:50 +01:00
|
|
|
# Check Inputs
|
|
|
|
, pytestCheckHook
|
2019-05-07 13:52:16 +01:00
|
|
|
, pytestrunner
|
|
|
|
, pytest-asyncio
|
|
|
|
, aiohttp
|
|
|
|
, beautifulsoup4
|
2019-09-11 20:39:28 +01:00
|
|
|
, asgiref
|
2020-05-27 21:36:03 +01:00
|
|
|
, setuptools
|
2019-05-07 13:52:16 +01:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "datasette";
|
2021-02-03 06:09:43 +00:00
|
|
|
version = "0.54.1";
|
2019-05-07 13:52:16 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "simonw";
|
|
|
|
repo = "datasette";
|
2019-05-07 13:52:16 +01:00
|
|
|
rev = version;
|
2021-02-03 06:09:43 +00:00
|
|
|
sha256 = "sha256-Ixh56X9dI/FIJPXHXXGnFiYj3qeBmvW5L1FF7/0ofUQ=";
|
2019-05-07 13:52:16 +01:00
|
|
|
};
|
|
|
|
|
2019-11-09 18:37:16 +00:00
|
|
|
nativeBuildInputs = [ pytestrunner ];
|
2019-05-07 13:52:16 +01:00
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
2020-04-03 19:12:50 +01:00
|
|
|
aiofiles
|
2020-08-27 23:28:34 +01:00
|
|
|
asgi-csrf
|
2019-05-07 13:52:16 +01:00
|
|
|
click
|
|
|
|
click-default-group
|
2020-04-03 19:12:50 +01:00
|
|
|
janus
|
2019-05-07 13:52:16 +01:00
|
|
|
jinja2
|
|
|
|
hupper
|
2020-08-27 23:28:34 +01:00
|
|
|
mergedeep
|
2019-05-07 13:52:16 +01:00
|
|
|
pint
|
|
|
|
pluggy
|
2020-08-27 23:28:34 +01:00
|
|
|
python-baseconv
|
|
|
|
pyyaml
|
2019-09-11 20:39:28 +01:00
|
|
|
uvicorn
|
2020-05-27 21:36:03 +01:00
|
|
|
setuptools
|
2020-12-26 17:36:56 +00:00
|
|
|
httpx
|
|
|
|
asgiref
|
2019-05-07 13:52:16 +01:00
|
|
|
];
|
|
|
|
|
|
|
|
checkInputs = [
|
2020-04-03 19:12:50 +01:00
|
|
|
pytestCheckHook
|
2019-05-07 13:52:16 +01:00
|
|
|
pytest-asyncio
|
|
|
|
aiohttp
|
|
|
|
beautifulsoup4
|
|
|
|
];
|
|
|
|
|
|
|
|
postConfigure = ''
|
|
|
|
substituteInPlace setup.py \
|
2020-04-03 19:12:50 +01:00
|
|
|
--replace "click~=7.1.1" "click" \
|
|
|
|
--replace "click-default-group~=1.2.2" "click-default-group" \
|
|
|
|
--replace "hupper~=1.9" "hupper" \
|
|
|
|
--replace "pint~=0.9" "pint" \
|
2020-08-27 23:28:34 +01:00
|
|
|
--replace "pluggy~=0.13.0" "pluggy" \
|
2020-04-03 19:12:50 +01:00
|
|
|
--replace "uvicorn~=0.11" "uvicorn" \
|
|
|
|
--replace "PyYAML~=5.3" "PyYAML"
|
2019-05-07 13:52:16 +01:00
|
|
|
'';
|
|
|
|
|
2020-10-17 19:51:51 +01: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 10mins with 32 cores
|
2020-12-26 17:36:56 +00:00
|
|
|
# just run the csv tests, as this should give some indictation of correctness
|
2020-04-03 19:12:50 +01:00
|
|
|
pytestFlagsArray = [
|
2020-12-26 17:36:56 +00:00
|
|
|
"tests/test_csv.py"
|
2020-04-03 19:12:50 +01:00
|
|
|
];
|
|
|
|
disabledTests = [
|
|
|
|
"facet"
|
|
|
|
"_invalid_database" # checks error message when connecting to invalid database
|
|
|
|
];
|
2020-10-17 19:51:51 +01:00
|
|
|
|
|
|
|
pythonImportsCheck = [
|
|
|
|
"datasette"
|
|
|
|
"datasette.cli"
|
|
|
|
"datasette.app"
|
|
|
|
"datasette.database"
|
|
|
|
"datasette.renderer"
|
|
|
|
"datasette.tracer"
|
|
|
|
"datasette.plugins"
|
|
|
|
];
|
2019-05-07 13:52:16 +01:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "An instant JSON API for your SQLite databases";
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://github.com/simonw/datasette";
|
2019-05-07 13:52:16 +01:00
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = [ maintainers.costrouc ];
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|