nixpkgs/pkgs/development/python-modules/datasette/default.nix

98 lines
1.8 KiB
Nix
Raw Normal View History

2019-05-07 12:52:16 +00:00
{ lib
, buildPythonPackage
, fetchFromGitHub
2020-04-03 18:12:50 +00:00
, aiofiles
, asgi-csrf
2019-05-07 12:52:16 +00:00
, click
, click-default-group
2020-04-03 18:12:50 +00:00
, janus
2019-05-07 12:52:16 +00:00
, jinja2
, hupper
, mergedeep
2019-05-07 12:52:16 +00:00
, pint
, pluggy
, python-baseconv
, pyyaml
2020-04-03 18:12:50 +00:00
, uvicorn
# Check Inputs
, pytestCheckHook
2019-05-07 12:52:16 +00:00
, pytestrunner
, pytest-asyncio
, aiohttp
, beautifulsoup4
, asgiref
, setuptools
2019-05-07 12:52:16 +00:00
}:
buildPythonPackage rec {
pname = "datasette";
version = "0.46";
2019-05-07 12:52:16 +00:00
src = fetchFromGitHub {
owner = "simonw";
repo = "datasette";
2019-05-07 12:52:16 +00:00
rev = version;
sha256 = "0g4dfq5ykifa9628cb4i7gvx98p8hvb99gzfxk3bkvq1v9p4kcqq";
2019-05-07 12:52:16 +00:00
};
nativeBuildInputs = [ pytestrunner ];
2019-05-07 12:52:16 +00:00
propagatedBuildInputs = [
2020-04-03 18:12:50 +00:00
aiofiles
asgi-csrf
2019-05-07 12:52:16 +00:00
click
click-default-group
2020-04-03 18:12:50 +00:00
janus
2019-05-07 12:52:16 +00:00
jinja2
hupper
mergedeep
2019-05-07 12:52:16 +00:00
pint
pluggy
python-baseconv
pyyaml
uvicorn
setuptools
2019-05-07 12:52:16 +00:00
];
checkInputs = [
2020-04-03 18:12:50 +00:00
pytestCheckHook
2019-05-07 12:52:16 +00:00
pytest-asyncio
aiohttp
beautifulsoup4
asgiref
2019-05-07 12:52:16 +00:00
];
postConfigure = ''
substituteInPlace setup.py \
2020-04-03 18:12:50 +00: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" \
--replace "pluggy~=0.13.0" "pluggy" \
2020-04-03 18:12:50 +00:00
--replace "uvicorn~=0.11" "uvicorn" \
--replace "PyYAML~=5.3" "PyYAML"
2019-05-07 12:52:16 +00:00
'';
# test_html is very slow
# test_black fails on darwin
2020-04-03 18:12:50 +00:00
dontUseSetuptoolsCheck = true;
pytestFlagsArray = [
"--ignore=tests/test_html.py"
"--ignore=tests/test_docs.py"
"--ignore=tests/test_black.py"
];
disabledTests = [
"facet"
"_invalid_database" # checks error message when connecting to invalid database
];
pythonImportsCheck = [ "datasette" ];
2019-05-07 12:52:16 +00:00
meta = with lib; {
description = "An instant JSON API for your SQLite databases";
homepage = "https://github.com/simonw/datasette";
2019-05-07 12:52:16 +00:00
license = licenses.asl20;
maintainers = [ maintainers.costrouc ];
};
}