3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/development/python-modules/datasette/default.nix

114 lines
2.2 KiB
Nix
Raw Normal View History

2019-05-07 13:52:16 +01:00
{ lib
, buildPythonPackage
, fetchFromGitHub
2020-04-03 19:12:50 +01:00
, aiofiles
, asgi-csrf
2019-05-07 13:52:16 +01:00
, click
, click-default-group
, itsdangerous
2020-04-03 19:12:50 +01:00
, janus
2019-05-07 13:52:16 +01:00
, jinja2
, hupper
, mergedeep
2019-05-07 13:52:16 +01:00
, pint
, pluggy
, 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
, pytest-runner
2019-05-07 13:52:16 +01:00
, pytest-asyncio
, pytest-timeout
2019-05-07 13:52:16 +01:00
, aiohttp
, beautifulsoup4
, asgiref
, setuptools
, trustme
, pythonOlder
2019-05-07 13:52:16 +01:00
}:
buildPythonPackage rec {
pname = "datasette";
version = "0.57.1";
disabled = pythonOlder "3.6";
2019-05-07 13:52:16 +01:00
src = fetchFromGitHub {
owner = "simonw";
repo = pname;
2019-05-07 13:52:16 +01:00
rev = version;
sha256 = "sha256-BHsf3GOganPhsDiZlRxvAsRZH/Sq+Jr+CZcc2ubce+8=";
2019-05-07 13:52:16 +01:00
};
nativeBuildInputs = [ pytest-runner ];
2019-05-07 13:52:16 +01:00
propagatedBuildInputs = [
2020-04-03 19:12:50 +01:00
aiofiles
asgi-csrf
asgiref
2019-05-07 13:52:16 +01:00
click
click-default-group
httpx
hupper
itsdangerous
2020-04-03 19:12:50 +01:00
janus
2019-05-07 13:52:16 +01:00
jinja2
mergedeep
2019-05-07 13:52:16 +01:00
pint
pluggy
python-baseconv
pyyaml
setuptools
uvicorn
2019-05-07 13:52:16 +01:00
];
checkInputs = [
aiohttp
beautifulsoup4
pytest-asyncio
pytest-timeout
pytestCheckHook
trustme
2019-05-07 13:52:16 +01:00
];
postConfigure = ''
substituteInPlace setup.py \
2020-04-03 19:12:50 +01:00
--replace "click-default-group~=1.2.2" "click-default-group" \
--replace "hupper~=1.9" "hupper" \
--replace "pint~=0.9" "pint" \
--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
'';
# 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-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
];
2020-04-03 19:12:50 +01:00
disabledTests = [
"facet"
"_invalid_database" # checks error message when connecting to invalid database
];
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 = "Multi-tool for exploring and publishing data";
homepage = "https://datasette.io/";
2019-05-07 13:52:16 +01:00
license = licenses.asl20;
maintainers = [ maintainers.costrouc ];
};
}