2019-07-25 21:02:18 +00:00
|
|
|
{ lib
|
2019-08-20 18:52:39 +00:00
|
|
|
, stdenv
|
2019-07-25 21:02:18 +00:00
|
|
|
, buildPythonPackage
|
2020-02-28 16:17:48 +00:00
|
|
|
, fetchFromGitHub
|
2021-01-04 03:00:22 +00:00
|
|
|
, isPy27
|
2019-07-25 21:02:18 +00:00
|
|
|
, aiofiles
|
|
|
|
, graphene
|
|
|
|
, itsdangerous
|
|
|
|
, jinja2
|
2021-01-04 03:00:22 +00:00
|
|
|
, python-multipart
|
2019-07-25 21:02:18 +00:00
|
|
|
, pyyaml
|
|
|
|
, requests
|
2019-12-29 18:10:17 +00:00
|
|
|
, aiosqlite
|
2021-01-04 03:00:22 +00:00
|
|
|
, databases
|
|
|
|
, pytestCheckHook
|
|
|
|
, pytest-asyncio
|
|
|
|
, typing-extensions
|
|
|
|
, ApplicationServices
|
2019-07-25 21:02:18 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "starlette";
|
2021-02-11 01:42:45 +00:00
|
|
|
version = "0.14.2";
|
2019-07-25 21:02:18 +00:00
|
|
|
disabled = isPy27;
|
|
|
|
|
2020-02-28 16:17:48 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "encode";
|
|
|
|
repo = pname;
|
|
|
|
rev = version;
|
2021-02-11 01:42:45 +00:00
|
|
|
sha256 = "0fz28czvwiww693ig9vwdja59xxs7m0yp1df32ms1hzr99666bia";
|
2019-07-25 21:02:18 +00:00
|
|
|
};
|
|
|
|
|
2021-02-11 01:42:45 +00:00
|
|
|
postPatch = ''
|
|
|
|
# remove coverage arguments to pytest
|
|
|
|
sed -i '/--cov/d' setup.cfg
|
|
|
|
'';
|
|
|
|
|
2019-07-25 21:02:18 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
aiofiles
|
|
|
|
graphene
|
|
|
|
itsdangerous
|
|
|
|
jinja2
|
2021-01-04 03:00:22 +00:00
|
|
|
python-multipart
|
2019-07-25 21:02:18 +00:00
|
|
|
pyyaml
|
|
|
|
requests
|
2021-01-04 03:00:22 +00:00
|
|
|
] ++ lib.optional stdenv.isDarwin [ ApplicationServices ];
|
2019-07-25 21:02:18 +00:00
|
|
|
|
2019-12-29 18:10:17 +00:00
|
|
|
checkInputs = [
|
|
|
|
aiosqlite
|
2021-01-04 03:00:22 +00:00
|
|
|
databases
|
2021-02-10 20:32:08 +00:00
|
|
|
pytest-asyncio
|
2021-01-04 03:00:22 +00:00
|
|
|
pytestCheckHook
|
|
|
|
typing-extensions
|
2019-12-29 18:10:17 +00:00
|
|
|
];
|
|
|
|
|
2021-07-06 19:33:37 +00:00
|
|
|
disabledTestPaths = [
|
|
|
|
# fails to import graphql, but integrated graphql support is about to
|
|
|
|
# be removed in 0.15, see https://github.com/encode/starlette/pull/1135.
|
|
|
|
"tests/test_graphql.py"
|
|
|
|
# contextfunction was removed in Jinja 3.1
|
|
|
|
"tests/test_templates.py"
|
|
|
|
];
|
2021-02-11 01:42:45 +00:00
|
|
|
|
2020-08-27 22:27:15 +00:00
|
|
|
pythonImportsCheck = [ "starlette" ];
|
2019-07-25 21:02:18 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
2020-04-07 07:21:33 +00:00
|
|
|
homepage = "https://www.starlette.io/";
|
2019-07-25 21:02:18 +00:00
|
|
|
description = "The little ASGI framework that shines";
|
|
|
|
license = licenses.bsd3;
|
|
|
|
maintainers = with maintainers; [ wd15 ];
|
|
|
|
};
|
|
|
|
}
|