2020-04-24 23:36:52 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
2023-01-20 10:41:00 +00:00
|
|
|
, hatchling
|
|
|
|
|
|
|
|
# runtime
|
|
|
|
, ApplicationServices
|
2021-09-18 10:52:07 +00:00
|
|
|
, anyio
|
2020-04-24 23:36:52 +00:00
|
|
|
, itsdangerous
|
|
|
|
, jinja2
|
2021-01-09 10:05:03 +00:00
|
|
|
, python-multipart
|
2020-04-24 23:36:52 +00:00
|
|
|
, pyyaml
|
2023-02-02 18:25:31 +00:00
|
|
|
, httpx
|
2023-01-20 10:41:00 +00:00
|
|
|
, typing-extensions
|
|
|
|
|
|
|
|
# tests
|
2021-09-18 10:52:07 +00:00
|
|
|
, pytestCheckHook
|
|
|
|
, pythonOlder
|
|
|
|
, trio
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "starlette";
|
2024-01-13 08:15:51 +00:00
|
|
|
version = "0.32.0.post1";
|
2023-01-20 10:41:00 +00:00
|
|
|
format = "pyproject";
|
2022-01-03 16:56:52 +00:00
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
disabled = pythonOlder "3.7";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "encode";
|
|
|
|
repo = pname;
|
2022-08-12 12:06:08 +00:00
|
|
|
rev = "refs/tags/${version}";
|
2024-01-13 08:15:51 +00:00
|
|
|
hash = "sha256-1twyN3fSlxwfDtyqaFFuCAVehLZ8vCV4voCT7CVSEbk=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2023-01-20 10:41:00 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
hatchling
|
2022-11-02 22:02:43 +00:00
|
|
|
];
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
propagatedBuildInputs = [
|
2021-09-18 10:52:07 +00:00
|
|
|
anyio
|
2020-04-24 23:36:52 +00:00
|
|
|
itsdangerous
|
|
|
|
jinja2
|
2021-01-09 10:05:03 +00:00
|
|
|
python-multipart
|
2020-04-24 23:36:52 +00:00
|
|
|
pyyaml
|
2023-02-02 18:25:31 +00:00
|
|
|
httpx
|
|
|
|
] ++ lib.optionals (pythonOlder "3.10") [
|
2021-09-18 10:52:07 +00:00
|
|
|
typing-extensions
|
2022-10-30 15:09:59 +00:00
|
|
|
] ++ lib.optionals stdenv.isDarwin [
|
2021-09-18 10:52:07 +00:00
|
|
|
ApplicationServices
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2021-01-09 10:05:03 +00:00
|
|
|
pytestCheckHook
|
2021-09-18 10:52:07 +00:00
|
|
|
trio
|
2021-01-09 10:05:03 +00:00
|
|
|
typing-extensions
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
2023-01-20 10:41:00 +00:00
|
|
|
pytestFlagsArray = [
|
|
|
|
"-W" "ignore::DeprecationWarning"
|
|
|
|
"-W" "ignore::trio.TrioDeprecationWarning"
|
|
|
|
];
|
|
|
|
|
2021-09-18 10:52:07 +00:00
|
|
|
disabledTests = [
|
|
|
|
# asserts fail due to inclusion of br in Accept-Encoding
|
|
|
|
"test_websocket_headers"
|
|
|
|
"test_request_headers"
|
2021-07-14 22:03:04 +00:00
|
|
|
];
|
2021-03-23 19:22:30 +00:00
|
|
|
|
2022-01-03 16:56:52 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"starlette"
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
2023-01-20 10:41:00 +00:00
|
|
|
changelog = "https://github.com/encode/starlette/releases/tag/${version}";
|
2023-11-16 04:20:00 +00:00
|
|
|
downloadPage = "https://github.com/encode/starlette";
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://www.starlette.io/";
|
|
|
|
description = "The little ASGI framework that shines";
|
|
|
|
license = licenses.bsd3;
|
|
|
|
maintainers = with maintainers; [ wd15 ];
|
|
|
|
};
|
|
|
|
}
|