depot/third_party/nixpkgs/pkgs/development/python-modules/quart/default.nix
Default email bcb2f287e1 Project import generated by Copybara.
GitOrigin-RevId: d603719ec6e294f034936c0d0dc06f689d91b6c3
2024-06-20 20:27:18 +05:30

89 lines
1.5 KiB
Nix

{
lib,
buildPythonPackage,
fetchFromGitHub,
pythonOlder,
# build-system
poetry-core,
# propagates
aiofiles,
blinker,
click,
flask,
hypercorn,
importlib-metadata,
itsdangerous,
jinja2,
markupsafe,
pydata-sphinx-theme,
python-dotenv,
typing-extensions,
werkzeug,
# tests
hypothesis,
mock,
py,
pytest-asyncio,
pytest7CheckHook,
}:
buildPythonPackage rec {
pname = "quart";
version = "0.19.6";
pyproject = true;
src = fetchFromGitHub {
owner = "pallets";
repo = "quart";
rev = "refs/tags/${version}";
hash = "sha256-oR03Qu93F+pcWywbdYgMKIAdohBNezlGz04ws3yGAxs=";
};
build-system = [ poetry-core ];
postPatch = ''
substituteInPlace pyproject.toml \
--replace "--no-cov-on-fail " ""
'';
dependencies =
[
aiofiles
blinker
click
flask
hypercorn
itsdangerous
jinja2
markupsafe
pydata-sphinx-theme
python-dotenv
werkzeug
]
++ lib.optionals (pythonOlder "3.10") [
importlib-metadata
typing-extensions
];
pythonImportsCheck = [ "quart" ];
nativeCheckInputs = [
hypothesis
mock
py
pytest-asyncio
pytest7CheckHook
];
meta = with lib; {
description = "Async Python micro framework for building web applications";
mainProgram = "quart";
homepage = "https://github.com/pallets/quart/";
changelog = "https://github.com/pallets/quart/blob/${src.rev}/CHANGES.rst";
license = licenses.mit;
maintainers = with maintainers; [ hexa ];
};
}