3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/development/python-modules/starlette/default.nix
Daniel Wheeler ffebc623e9 python37Packages.starlette: 0.13.0 -> 0.12.9
- Reverting the version of Starlette as FastAPI can not use anything
   greater than 0.12.12. FastAPI is Starlette's only dependent.

 - Use fetchurl instead of fetchPypi as this is now the preferred
   method. This also makes the tests pass and, thus, the build, which
   was failing.
2020-03-12 21:48:07 -07:00

68 lines
1.3 KiB
Nix

{ lib
, stdenv
, buildPythonPackage
, fetchFromGitHub
, aiofiles
, graphene
, itsdangerous
, jinja2
, pyyaml
, requests
, ujson
, python-multipart
, pytest
, uvicorn
, isPy27
, darwin
, databases
, aiosqlite
}:
buildPythonPackage rec {
pname = "starlette";
# This is not the latest version of Starlette, however, later
# versions of Starlette break FastAPI due to
# https://github.com/tiangolo/fastapi/issues/683. Please update when
# possible. FastAPI is currently Starlette's only dependent.
version = "0.12.9";
disabled = isPy27;
src = fetchFromGitHub {
owner = "encode";
repo = pname;
rev = version;
sha256 = "0w44s8ynzy8w8dgm755c8jina9i4dd87vqkcv7jc1kwkg384w9i5";
};
propagatedBuildInputs = [
aiofiles
graphene
itsdangerous
jinja2
pyyaml
requests
ujson
uvicorn
python-multipart
databases
] ++ stdenv.lib.optional stdenv.isDarwin [ darwin.apple_sdk.frameworks.ApplicationServices ];
checkInputs = [
pytest
aiosqlite
];
checkPhase = ''
pytest --ignore=tests/test_graphql.py
'';
meta = with lib; {
homepage = https://www.starlette.io/;
description = "The little ASGI framework that shines";
license = licenses.bsd3;
maintainers = with maintainers; [ wd15 ];
};
}